mirror of
https://github.com/skidoodle/iphistory.git
synced 2026-04-27 23:37:35 +02:00
dockerrrrr
This commit is contained in:
+8
-2
@@ -1,16 +1,22 @@
|
|||||||
FROM ghcr.io/a-h/templ:latest AS generate-stage
|
FROM ghcr.io/a-h/templ:latest AS generate-stage
|
||||||
COPY . /app
|
COPY --chown=65532:65532 . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN ["templ", "generate"]
|
RUN ["templ", "generate"]
|
||||||
|
|
||||||
FROM golang:alpine AS build-stage
|
FROM golang:alpine AS build-stage
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=generate-stage /app /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
|
FROM alpine:latest
|
||||||
RUN apk --no-cache add ca-certificates
|
RUN apk --no-cache add ca-certificates
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
COPY --from=build-stage /app/iphistory .
|
COPY --from=build-stage /app/iphistory .
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["./iphistory"]
|
CMD ["./iphistory"]
|
||||||
|
|||||||
Reference in New Issue
Block a user