Skip to content

Commit c147ff9

Browse files
committed
update dockerfile
1 parent 0ec4b45 commit c147ff9

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
FROM python:3.9-alpine
1+
FROM alpine:3.22
2+
RUN apk --no-cache add ca-certificates
23

3-
WORKDIR /app
4+
ARG IMAGE_TAG
5+
ENV IMAGE_TAG=$IMAGE_TAG
6+
LABEL org.opencontainers.image.version=$IMAGE_TAG
7+
8+
ARG TARGETOS
9+
ARG TARGETARCH
410

5-
RUN pip install flask wakeonlan pythonping
11+
WORKDIR /app
612

713
COPY . .
814

9-
ENV PORT=5555
15+
COPY dist/${TARGETOS}/${TARGETARCH}/app .
1016

11-
EXPOSE ${PORT}
17+
RUN rm dist/ -r
1218

13-
CMD ["python", "app.py"]
19+
CMD ["./app"]

0 commit comments

Comments
 (0)