Update Dockerfile

This commit is contained in:
swastik7777 2024-06-04 11:27:27 +05:30 committed by GitHub
parent 9598409e53
commit 2c8fe82429
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -17,14 +17,14 @@ RUN go get github.com/codegangsta/negroni \
github.com/gorilla/mux \
github.com/xyproto/simpleredis/v2
WORKDIR /app
ADD .guestbook-go/main.go .
ADD ./guestbook-go/main.go .
RUN CGO_ENABLED=0 GOOS=linux go build -o main .
FROM scratch
WORKDIR /app
COPY --from=0 /app/main .
COPY .guestbook-go/public/index.html public/index.html
COPY .guestbook-go/public/script.js public/script.js
COPY .guestbook-go/public/style.css public/style.css
COPY ./guestbook-go/public/index.html public/index.html
COPY ./guestbook-go/public/script.js public/script.js
COPY ./guestbook-go/public/style.css public/style.css
CMD ["/app/main"]
EXPOSE 3000