Skip to content

Commit 8738ba6

Browse files
committed
feat: move to alpine image
1 parent 73269d5 commit 8738ba6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/push_docker_image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# Use lowercase name of repository, as buildx rejects the name otherwise.
2727
echo "repository=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
2828
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v1
29+
uses: docker/setup-buildx-action@v3
3030
- name: Cache Docker layers
3131
uses: actions/cache@v4
3232
with:
@@ -35,14 +35,14 @@ jobs:
3535
restore-keys: |
3636
${{ runner.os }}-buildx-
3737
- name: Login to GitHub Container Registry
38-
uses: docker/login-action@v1
38+
uses: docker/login-action@v3
3939
with:
4040
registry: ghcr.io
4141
username: ${{ github.actor }}
4242
password: ${{ secrets.GITHUB_TOKEN }}
4343
- name: Build and push
4444
id: docker_build
45-
uses: docker/build-push-action@v2
45+
uses: docker/build-push-action@v6
4646
with:
4747
push: true
4848
tags: ghcr.io/${{ env.repository }}:${{ env.tag_name }}

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
FROM python:3.10
1+
FROM python:3.10-alpine
22

3-
RUN addgroup --gid 1000 server && adduser --uid 1000 --gid 1000 --system server
3+
RUN adduser -D server
44
WORKDIR /home/server
55

66
# Copy requirements first as to not disturb cache for other changes.
77
COPY requirements.txt .
88

9+
# Install dependencies
10+
RUN apk add -U --no-cache libpq-dev build-base
11+
912
RUN pip3 install -r requirements.txt && \
1013
pip3 install gunicorn
1114

0 commit comments

Comments
 (0)