mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-22 06:46:32 +00:00
23 lines
490 B
Docker
23 lines
490 B
Docker
# Build API
|
|
FROM golang:alpine AS builder
|
|
RUN apk add --no-cache git build-base
|
|
WORKDIR /go/src/app
|
|
COPY . .
|
|
RUN go get -d -v ./...
|
|
RUN go build -o /go/bin/api -v ./app/api/*.go
|
|
|
|
|
|
# Production Stage
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
COPY ./config.template.yml /app/config.yml
|
|
COPY --from=builder /go/bin/api /app
|
|
|
|
RUN chmod +x /app/api
|
|
RUN chmod +x /bin/manage
|
|
|
|
LABEL Name=gowebtemplate Version=0.0.1
|
|
EXPOSE 7745
|
|
WORKDIR /app
|
|
CMD [ "./api" ]
|