update Dockerfile for python
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,13 +1,10 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM golang:latest AS build
|
FROM python:3.12-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go mod download
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./reddit_notify
|
|
||||||
|
|
||||||
FROM alpine:latest
|
RUN pip install -r requirements.txt
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=build /app/reddit_notify /app/reddit_notify
|
ENTRYPOINT ["python", "main.py"]
|
||||||
RUN chmod +x ./reddit_notify
|
|
||||||
CMD [ "./reddit_notify" ]
|
|
Reference in New Issue
Block a user