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.dvza

43 lines
592 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/dvzaservice
RUN go build -o /app/bin/dvza
WORKDIR /app/dvzaservice/app
RUN npm i
RUN npx webpack
##
## Deploy
##
FROM alpine
WORKDIR /
COPY ./dvzaservice/templates /templates
COPY --from=build /app/bin/dvza ./dvza
COPY --from=build /app/dvzaservice/assets ./assets
EXPOSE 9095
EXPOSE 9999
# > "logs/$(date +'%Y%m%d_%H%M').log" 2>&1
ENTRYPOINT ["/dvza"]