Skip to content

Commit

Permalink
use a base gcc image
Browse files Browse the repository at this point in the history
  • Loading branch information
Signorini committed Mar 31, 2020
1 parent 0a36805 commit f30945d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 26 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
FROM python:3.8-slim AS compile
FROM maestroserver/maestro-python-gcc AS compile-graviz

RUN apt-get -y update && \
apt-get -y install --no-install-recommends \
curl \
gcc \
openssl \
build-essential \
libcurl4-openssl-dev \
libssl-dev \
pkg-config \
graphviz-dev \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -19,15 +13,15 @@ RUN python3 -m venv /home/app/venv
ENV PATH="/home/app/venv/bin:$PATH"

COPY requirements.txt requirements.txt
RUN pip install --upgrade pip gunicorn && \
RUN pip3 install --upgrade pip gunicorn && \
pip3 install --no-cache-dir -r requirements.txt


# production image
FROM python:3.8-slim
RUN useradd --create-home app

COPY --from=compile /home/app/venv /home/app/venv
COPY --from=compile-graviz /home/app/venv /home/app/venv

ENV PATH="/home/app/venv/bin:$PATH"

Expand Down
12 changes: 3 additions & 9 deletions DockerfileCelery
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
FROM python:3.8-slim AS compile
FROM maestroserver/maestro-python-gcc AS compile-graviz

RUN apt-get -y update && \
apt-get -y install --no-install-recommends \
curl \
gcc \
openssl \
build-essential \
libcurl4-openssl-dev \
libssl-dev \
pkg-config \
graphviz-dev \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -19,15 +13,15 @@ RUN python3 -m venv /home/app/venv
ENV PATH="/home/app/venv/bin:$PATH"

COPY requirements.txt requirements.txt
RUN pip install --upgrade pip && \
RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt


# production image
FROM python:3.8-slim
RUN useradd --create-home app

COPY --from=compile /home/app/venv /home/app/venv
COPY --from=compile-graviz /home/app/venv /home/app/venv

ENV PATH="/home/app/venv/bin:$PATH"

Expand Down
4 changes: 0 additions & 4 deletions docker-entrypoint-workers.sh

This file was deleted.

4 changes: 0 additions & 4 deletions docker-entrypoint.sh

This file was deleted.

0 comments on commit f30945d

Please sign in to comment.