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

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