Add Dockerfile
This commit is contained in:
parent
8e948fc451
commit
e89099a18c
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
FROM node:20-alpine as nodebuild
|
||||
|
||||
WORKDIR /ui
|
||||
|
||||
COPY ui/ .
|
||||
|
||||
RUN npm install --network-timeout=100000 && \
|
||||
npm run build
|
||||
|
||||
|
||||
FROM golang:1-alpine AS build
|
||||
|
||||
RUN apk --no-cache add git go-bindata
|
||||
|
||||
COPY . /go/src/git.nemunai.re/nemunaire/hathoris
|
||||
COPY --from=nodebuild /ui/build /go/src/git.nemunai.re/nemunaire/hathoris/ui/build
|
||||
WORKDIR /go/src/git.nemunai.re/nemunaire/hathoris
|
||||
RUN go get && go generate && go build -ldflags="-s -w"
|
||||
|
||||
|
||||
FROM alpine:3.18
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["/srv/hathoris"]
|
||||
|
||||
COPY --from=build /go/src/git.nemunai.re/nemunaire/hathoris/hathoris /srv/hathoris
|
6
Dockerfile-norebuild
Normal file
6
Dockerfile-norebuild
Normal file
@ -0,0 +1,6 @@
|
||||
FROM alpine:3.18
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["/srv/hathoris"]
|
||||
|
||||
COPY hathoris /srv/hathoris
|
Loading…
Reference in New Issue
Block a user