From 5b6b42cf15a8922b8ab3c89664b6f88efb04c644 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 11 Dec 2023 15:29:28 +1100 Subject: [PATCH] feat: Add dockerfile --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1925a26 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder + +WORKDIR /app + +COPY requirements.txt /app +RUN --mount=type=cache,target=/root/.cache/pip \ + pip3 install -r requirements.txt + +COPY . /app + +# Set the timezone during the container build +RUN apk --update add tzdata && \ + cp /usr/share/zoneinfo/Australia/Sydney /etc/localtime && \ + echo "Australia/Sydney" > /etc/timezone + +EXPOSE 5000 + +ENTRYPOINT ["python3"] +CMD ["server.py"] + +FROM builder as dev-envs \ No newline at end of file