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

44 lines
645 B

# syntax=docker/dockerfile:1
##
## Build
##
FROM golang:1.19-alpine AS build
RUN apk update
RUN apk upgrade
RUN apk add build-base git
RUN apk add --update npm
WORKDIR /app
COPY ./ ./
RUN go mod tidy
RUN mkdir bin
WORKDIR /app/whiteboxservice
RUN go build -o /app/bin/wbx
WORKDIR /app/whiteboxservice/app
RUN npm i
RUN npx webpack
##
## Deploy
##
FROM alpine
WORKDIR /
COPY ./whiteboxservice/templates /templates
COPY ./whiteboxservice/bin/amd64 /wbxbin
COPY --from=build /app/bin/wbx ./wbx
COPY --from=build /app/whiteboxservice/assets ./assets
EXPOSE 8085
EXPOSE 8888
# > "logs/$(date +'%Y%m%d_%H%M').log" 2>&1
ENTRYPOINT ["/wbx"]