fix: Add dockerfile
All checks were successful
Build Docker / Build Image (push) Successful in 21s

This commit is contained in:
Nathan Woodburn 2023-10-30 15:41:18 +11:00
parent 18b18bc2a2
commit 1eb9176f0f
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 17 additions and 1 deletions

View File

@ -20,7 +20,6 @@ jobs:
apt-get install docker-ce-cli -y
- name: Build Docker image
run : |
cd master
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
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
# Add mount point for data volume
VOLUME /data
ENTRYPOINT ["python3"]
CMD ["server.py"]
FROM builder as dev-envs