You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
okapidemo/Dockerfile.wbx

39 lines
566 B

# syntax=docker/dockerfile:1
##
## Build
##
FROM golang:1.18-alpine AS build
RUN apk update
RUN apk upgrade
RUN apk add build-base git
WORKDIR /app
COPY ./ ./
RUN go mod tidy
RUN mkdir bin
WORKDIR /app/whiteboxservice
RUN go build -o /app/bin/wbx
##
## Deploy
##
FROM golang:1.18-alpine
WORKDIR /
COPY ./whiteboxservice/assets /assets
COPY ./whiteboxservice/templates /templates
COPY ./whiteboxservice/bin /bin
COPY --from=build /app/bin/wbx ./wbx
RUN adduser -D nonroot
USER nonroot:nonroot
# > "logs/$(date +'%Y%m%d_%H%M').log" 2>&1
ENTRYPOINT ["/wbx"]