mirror of
https://github.com/zix99/traefik-lazyload.git
synced 2025-12-21 13:23:04 +01:00
Fix and release a docker build
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,11 +1,19 @@
|
||||
FROM golang:1.18
|
||||
# BUILD
|
||||
FROM golang:1.18-alpine3.17 AS build
|
||||
|
||||
EXPOSE 8080
|
||||
WORKDIR /opt/app
|
||||
COPY go.* .
|
||||
WORKDIR /opt/src
|
||||
COPY go.* ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go build .
|
||||
|
||||
# Make the final image
|
||||
FROM alpine:latest
|
||||
|
||||
EXPOSE 8080
|
||||
WORKDIR /opt/app
|
||||
COPY --from=build /opt/src/traefik-lazyload .
|
||||
COPY config.yaml .
|
||||
|
||||
CMD ./traefik-lazyload
|
||||
|
||||
Reference in New Issue
Block a user