Commit 77458587 authored by Anthony Jacob's avatar Anthony Jacob
Browse files

change docker build (avoid including .env, change layer in Dockerfile for better cache)

parent cfd93503
Loading
Loading
Loading
Loading

.dockerignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
app/.env
app/.env*
 No newline at end of file
+10 −3
Original line number Diff line number Diff line
FROM python:latest

RUN apt update && apt install -yq iputils-ping iproute2


RUN apt update && \
    apt install -y --no-install-recommends iputils-ping iproute2 && \
    apt clean && \
    rm -rf /var/lib/apt/lists/*

COPY ./requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install -r /app/requirements.txt
RUN pip install --upgrade pip && pip install --no-cache-dir -r /app/requirements.txt

COPY docker/entrypoint.sh /entrypoint/

@@ -13,3 +17,6 @@ EXPOSE 8181
COPY ./app /app

ENTRYPOINT [ "sh" , "/entrypoint/entrypoint.sh" ]


+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ docker container rm -f resume-api
docker run -dit ^
-p 84:80 -p 446:443 ^
-v C:\Users\antho\dev_workspace\certs\:/etc/certs/ ^
-v C:\Users\antho\dev_workspace\resume-website-2025\api\app\.env:/app/.env ^
--network=infra ^
-h apidev.anthony-jacob.com ^
--restart=always ^