add dockerfile
This commit is contained in:
parent
56d2804626
commit
1175cf3e98
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
### STAGE 1: build ###
|
||||||
|
FROM golang:1.18-alpine AS build
|
||||||
|
WORKDIR /usr/app
|
||||||
|
COPY . .
|
||||||
|
RUN go build .
|
||||||
|
RUN ls -a
|
||||||
|
|
||||||
|
### STAGE 2: Run ###
|
||||||
|
FROM golang:1.18-alpine
|
||||||
|
WORKDIR /usr/app
|
||||||
|
COPY --from=build /usr/app/personalwebsite /usr/app/personalwebsite
|
||||||
|
COPY ./templates /usr/app/templates
|
||||||
|
COPY ./resources /usr/app/resources
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD [ "/usr/app/personalwebsite" ]
|
Loading…
Reference in New Issue
Block a user