Fakultas Ilmu Komputer UI

Verified Commit 5f2be6c4 authored by Faisal Hanif's avatar Faisal Hanif
Browse files

[CHORES] Use python slim image instead of alpine

parent 885e9210
Pipeline #77017 passed with stages
in 2 minutes and 48 seconds
FROM python:3.9.3-alpine3.13
FROM python:3.9.5-slim
WORKDIR /srv
......@@ -6,22 +6,8 @@ ENV PYTHONUNBUFFERED 1
COPY requirements.txt .
RUN apk add --no-cache --virtual .build-deps \
gcc postgresql-dev libpq musl-dev jpeg-dev zlib-dev libffi-dev \
&& pip install -r requirements.txt \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& runDeps="$( \
scanelf --needed --nobanner --recursive /usr/local \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --virtual .rundeps $runDeps \
&& apk del .build-deps
RUN apt-get -y update && apt-get -y install libpq-dev gcc
RUN pip install -r requirements.txt
# copy required files to run
COPY project project
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment