diff --git a/challenges/shrink-the-image/.dockerignore b/challenges/shrink-the-image/.dockerignore new file mode 100644 index 0000000..89b6e16 --- /dev/null +++ b/challenges/shrink-the-image/.dockerignore @@ -0,0 +1,2 @@ +grade/ +tests/ \ No newline at end of file diff --git a/challenges/shrink-the-image/Dockerfile b/challenges/shrink-the-image/Dockerfile index 1ac445d..55431f9 100644 --- a/challenges/shrink-the-image/Dockerfile +++ b/challenges/shrink-the-image/Dockerfile @@ -1,15 +1,14 @@ -FROM python:3.13 - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - git \ - vim +FROM python:3.11.18-alpine3.23 +ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 WORKDIR /app -COPY . . -RUN pip install -r requirements.txt -r requirements-dev.txt +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY app.py . EXPOSE 8000 -CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "app:app"] +USER daemon + +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "app:app"] \ No newline at end of file