Skip to content
Snippets Groups Projects
Unverified Commit fd69584f authored by JohannesGarm's avatar JohannesGarm Committed by GitHub
Browse files

Merge pull request #21 from marcosfsch/no-squash

Removed necessity for --squash
parents 7475dfc8 b638cddb
No related branches found
No related tags found
No related merge requests found
...@@ -7,5 +7,5 @@ clean: ...@@ -7,5 +7,5 @@ clean:
find . -name "*.pyc"|xargs rm find . -name "*.pyc"|xargs rm
docker-build: docker-build:
docker build -t opennsa --squash docker docker build -t opennsa docker
...@@ -10,37 +10,40 @@ ENV GIT_REPO https://github.com/NORDUnet/opennsa ...@@ -10,37 +10,40 @@ ENV GIT_REPO https://github.com/NORDUnet/opennsa
ENV USER opennsa ENV USER opennsa
# --- Base image ---
# Update and install dependencies
# pip to install twistar service-identity pyasn1
# pyasn1 and crypto is needed for ssh backends
RUN apt-get update && apt-get install -y git-core python3 python3-twisted-bin python3-openssl python3-psycopg2 python3-pip python3-crypto python3-dateutil
RUN pip3 install twistar service-identity pyasn1
# -- User setup -- # -- User setup --
RUN adduser --disabled-password --gecos 'OpenNSA user' $USER RUN adduser --disabled-password --gecos 'OpenNSA user' $USER
# -- Install OpenNSA -- # --- Base image ---
USER $USER # Update and install dependencies
WORKDIR /home/$USER # pip to install twistar service-identity pyasn1
# pyasn1 and crypto is needed for ssh backends
RUN echo git clone $GIT_REPO RUN apt update \
RUN git clone $GIT_REPO && apt install -y \
git-core \
python3 \
python3-twisted-bin \
python3-openssl \
python3-psycopg2 \
python3-pip \
python3-crypto \
python3-dateutil \
&& pip3 install \
twistar \
service-identity \
pyasn1 \
# -- Instal OpenNSA --
&& echo git clone $GIT_REPO \
&& su - $USER -c "git clone $GIT_REPO" \
# -- Cleanup -- # -- Cleanup --
# With --squash this makes the image go from 476 to 164 mb && apt remove -y \
USER root git-core \
RUN apt-get remove -y python3-pip git python3-pip \
RUN apt-get -y clean && apt autoremove -y \
RUN apt-get -y autoclean && rm -rf /var/lib/apt/lists/*
RUN apt-get -y autoremove
# -- Switch to OpenNSA directory -- # -- Switch to OpenNSA directory --
USER $USER USER $USER
WORKDIR /home/$USER/opennsa WORKDIR /home/$USER/opennsa
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment