2023-03-21 12:38:03 +00:00
|
|
|
### 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
|
2023-05-23 23:08:25 +00:00
|
|
|
COPY ./res /usr/app/res
|
2023-03-21 12:38:03 +00:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD [ "/usr/app/personalwebsite" ]
|