mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-23 23:36:30 +00:00
24 lines
490 B
Text
24 lines
490 B
Text
|
# 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" ]
|