mirror of
https://github.com/skidoodle/iphistory.git
synced 2026-04-28 15:57:36 +02:00
dockerrrrr
This commit is contained in:
+8
-2
@@ -1,16 +1,22 @@
|
||||
FROM ghcr.io/a-h/templ:latest AS generate-stage
|
||||
COPY . /app
|
||||
COPY --chown=65532:65532 . /app
|
||||
WORKDIR /app
|
||||
RUN ["templ", "generate"]
|
||||
|
||||
FROM golang:alpine AS build-stage
|
||||
RUN apk add --no-cache ca-certificates
|
||||
WORKDIR /app
|
||||
COPY --from=generate-stage /app /app
|
||||
RUN CGO_ENABLED=0 go build -o iphistory .
|
||||
|
||||
RUN CGO_ENABLED=0 go build \
|
||||
-buildvcs=false \
|
||||
-ldflags="-s -w" \
|
||||
-o iphistory .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /app/
|
||||
COPY --from=build-stage /app/iphistory .
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["./iphistory"]
|
||||
|
||||
Reference in New Issue
Block a user