18 lines
359 B
Docker
18 lines
359 B
Docker
|
### 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" ]
|