Compare commits
No commits in common. "5c913257725f357efc3eb7322717f93caca64404" and "6a21114ffb5b591fbc1d823c07f8f01e28a4f7fa" have entirely different histories.
5c91325772
...
6a21114ffb
17
Dockerfile
17
Dockerfile
@ -1,8 +1,10 @@
|
||||
# Build stage
|
||||
FROM golang:1.21.4-alpine AS builder
|
||||
# specify the base image to be used for the application
|
||||
FROM golang:1.21.4-alpine
|
||||
|
||||
# create the working directory in the image
|
||||
WORKDIR /app
|
||||
|
||||
# copy Go modules and dependencies to image
|
||||
COPY go.mod ./
|
||||
|
||||
# download Go modules and dependencies
|
||||
@ -11,14 +13,11 @@ RUN go mod download
|
||||
# copy all the Go files ending with .go extension
|
||||
COPY *.go ./
|
||||
|
||||
RUN go build -o golang-http-header
|
||||
|
||||
# Final stage
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /app/golang-http-header /
|
||||
# compile application
|
||||
RUN go build -o /golang-http-header
|
||||
|
||||
# network port at runtime
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["/golang-http-header"]
|
||||
# execute when the container starts
|
||||
CMD [ "/golang-http-header" ]
|
@ -22,7 +22,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: http-header
|
||||
image: git.kcrawford.net/kcrawford/golang-http-header:0.0.3
|
||||
image: git.kcrawford.net/kcrawford/golang-http-header:0.0.5
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user