mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 09:49:28 +08:00
combine hub and agent repos
This commit is contained in:
31
hub/dockerfile
Normal file
31
hub/dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Download Go modules
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY *.go ./
|
||||
COPY migrations ./migrations
|
||||
|
||||
# Build
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /beszel .
|
||||
|
||||
# ? -------------------------
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache \
|
||||
unzip \
|
||||
ca-certificates
|
||||
|
||||
COPY --from=builder /beszel /
|
||||
|
||||
COPY ./site/dist /site/dist
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT [ "/beszel" ]
|
||||
|
||||
CMD ["serve", "--http=0.0.0.0:8080"]
|
Reference in New Issue
Block a user