Skip to content

Commit

Permalink
Move useradd to the end of image build
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAntoine committed Apr 20, 2021
1 parent 0dc7399 commit f33ce1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions datascience/dummy_modification.py

This file was deleted.

11 changes: 6 additions & 5 deletions infra/docker/Dockerfile.DataPipeline
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ ENV VIRTUAL_ENV=/opt/venv
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

# Create non root user
RUN useradd -m -r ${USER} && \
chown ${USER} /home/${USER}
WORKDIR /home/${USER}

# Install system dependencies
RUN apt-get update && apt-get install -y \
libpq-dev \
Expand Down Expand Up @@ -41,6 +36,12 @@ RUN python3 -m venv $VIRTUAL_ENV && \
wheel && \
pip install -r /tmp/requirements.txt
# Make library importable

# Create non root user
RUN useradd -m -r ${USER} && \
chown ${USER} /home/${USER}
WORKDIR /home/${USER}

ENV PYTHONPATH=/home/${USER}

COPY datascience/ .
Expand Down

0 comments on commit f33ce1b

Please sign in to comment.