Skip to content

Commit

Permalink
Merge pull request #197 from SWE574-Fall2023-Group1/feature/168-reduc…
Browse files Browse the repository at this point in the history
…e-docker-image-sizes

Feature/168 reduce docker image sizes
  • Loading branch information
sadikkuzu authored Dec 2, 2023
2 parents 96d6489 + 4d297a9 commit 6e81c32
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ up: compose-up
down: compose-down

pre-commit:
@pip install -U pre-commit
@pre-commit install
pre-commit run --all-files

Expand Down
21 changes: 17 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
FROM python:3.11
FROM python:3.11-slim-buster

LABEL maintainer="SWE 574 - Fall 2023 - Group 1"

ENV PYTHONUNBUFFERED=1

WORKDIR /backend

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && \
apt-get install -y binutils libproj-dev gdal-bin

RUN : \
&& apt-get update -y \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \
binutils libproj-dev gdal-bin \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& python -m pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& :

COPY manage.py .

Expand Down
4 changes: 3 additions & 1 deletion backend/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

FROM node:18
FROM node:18-buster-slim

LABEL maintainer="SWE 574 - Fall 2023 - Group 1"

WORKDIR /app

Expand Down
1 change: 0 additions & 1 deletion backend/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ asgiref
Django
django-environ
environ
psycopg2
sqlparse
tzdata
djangorestframework
Expand Down
2 changes: 0 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ packaging==23.2
# drf-yasg
pillow==10.1.0
# via -r requirements.in
psycopg2==2.9.9
# via -r requirements.in
psycopg2-binary==2.9.9
# via -r requirements.in
pycodestyle==2.11.1
Expand Down

0 comments on commit 6e81c32

Please sign in to comment.