33 lines
599 B
Docker
33 lines
599 B
Docker
FROM node:18-alpine3.15 as nodebuild
|
|
|
|
WORKDIR /ui
|
|
|
|
RUN apk --no-cache add python2 build-base
|
|
|
|
COPY ui/ .
|
|
|
|
RUN npm install --network-timeout=100000 && \
|
|
npm run build
|
|
|
|
|
|
FROM golang:1-alpine as gobuild
|
|
|
|
RUN apk add --no-cache go-bindata
|
|
|
|
WORKDIR /go/src/git.nemunai.re/atsebay.t
|
|
|
|
COPY *.go go.mod go.sum ./
|
|
COPY --from=nodebuild /ui/build ui/build
|
|
|
|
RUN go get -d -v && \
|
|
go generate -v && \
|
|
go build -v -buildvcs=false -ldflags="-s -w" -o atsebay.t
|
|
|
|
|
|
FROM alpine:3.16
|
|
|
|
EXPOSE 8081
|
|
|
|
ENTRYPOINT ["atsebay.t"]
|
|
|
|
COPY --from=gobuild /go/src/git.nemunai.re/atsebay.t/atsebay.t /usr/bin/atsebay.t |