1
0
Fork 0

build: move Dockerfile for httpserver to build/ dir

This commit is contained in:
Vojtěch Mareš 2024-06-23 13:30:06 +02:00
parent 4814883454
commit 4c7f1c2aec
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -6,13 +6,13 @@ FROM --platform=${BUILDPLATFORM} golang:1.22-alpine${ALPINE_VERSION} AS builder
ARG BUILDPLATFORM
WORKDIR /app
WORKDIR /build
COPY go.mod go.sum ./
COPY ../../../go.mod go.sum ./
RUN go mod download
COPY . .
COPY ../../.. .
ARG TARGETOS
ARG TARGETARCH
@ -21,10 +21,10 @@ RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o yggdrasil ./cmd/
FROM alpine:${ALPINE_VERSION} AS runtime
WORKDIR /app
WORKDIR /srv
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/yggdrasil .
COPY --from=builder /build/yggdrasil .
CMD ["/app/yggdrasil"]
CMD ["/srv/yggdrasil"]