build: move Dockerfile for httpserver to build/ dir
This commit is contained in:
parent
4814883454
commit
4c7f1c2aec
1 changed files with 6 additions and 6 deletions
30
Dockerfile
30
Dockerfile
|
|
@ -1,30 +0,0 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG ALPINE_VERSION=3.19
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} golang:1.22-alpine${ALPINE_VERSION} AS builder
|
||||
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o yggdrasil ./cmd/yggdrasil
|
||||
|
||||
FROM alpine:${ALPINE_VERSION} AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
COPY --from=builder /app/yggdrasil .
|
||||
|
||||
CMD ["/app/yggdrasil"]
|
||||
Reference in a new issue