diff options
Diffstat (limited to 'docker/app/Dockerfile')
-rw-r--r-- | docker/app/Dockerfile | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile index 903e7dc6..8378ceb9 100644 --- a/docker/app/Dockerfile +++ b/docker/app/Dockerfile @@ -5,46 +5,19 @@ STOPSIGNAL SIGQUIT ARG EXTRAS=deploy # Create a user. -RUN adduser \ - --disabled-login \ - --no-create-home \ - --uid 1500 \ - pysite +RUN useradd --system --shell /bin/false --uid 1500 pysite # Install prerequisites needed to complete the dependency installation. -RUN apt-get update -y \ - && \ - apt-get install --no-install-recommends -y \ - gcc \ - libc-dev \ - libpq-dev \ - git \ - && \ - apt-get clean \ - && \ - rm -rf /var/lib/apt/lists/* +RUN install_packages git uwsgi -# Set up the working directory. +# Copy the project files into the working directory. WORKDIR /app -COPY Pipfile Pipfile.lock /app/ - -# Pip install the stuff we'll need. -RUN rm -r /opt/bitnami/python/lib/python3.*/site-packages/setuptools* && \ - pip install --no-cache-dir -U setuptools -RUN python3 -m pip install pipenv \ - && python3 -m pipenv install --system --deploy \ - && pip install uwsgi==2.0.18 - -# Copy everything into the docker environment. COPY . . -# RUN SECRET_KEY=placeholder DATABASE_URL=sqlite:// python3 manage.py collectstatic --no-input --clear --verbosity 0 - -# Remove the prerequisites, dependency installation is now complete. -RUN apt-get purge -y \ - gcc \ - libc-dev \ - libpq-dev +# Update setuptools by removing egg first, add other dependencies +RUN rm -r /opt/bitnami/python/lib/python3.*/site-packages/setuptools* && \ + pip install --no-cache-dir -U setuptools pipenv +RUN pipenv install --system --deploy # Migrate, collect and start the app. RUN chmod +x /app/docker/app/scripts/migrate.sh |