Skip to content
Snippets Groups Projects
Commit de612080 authored by Cellar Admin's avatar Cellar Admin 💬
Browse files

update Dockerfile

parent 35f692f7
No related branches found
No related tags found
No related merge requests found
FROM golang:latest
FROM registry.access.redhat.com/ubi8:latest
RUN dnf install golang git -y
WORKDIR /go/src/github.com/rcdelacruz/reverse-words/
COPY main.go .
RUN go get github.com/gorilla/mux && go get github.com/prometheus/client_golang/prometheus/promhttp
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
FROM scratch
COPY --from=0 /go/src/github.com/rcdelacruz/reverse-words/main .
EXPOSE 8080
CMD ["/main"]
CMD ["./main"]
FROM registry.access.redhat.com/ubi8:latest
RUN dnf install golang git -y
WORKDIR /go/src/github.com/rcdelacruz/reverse-words/
COPY main.go .
RUN go get github.com/gorilla/mux && go get github.com/prometheus/client_golang/prometheus/promhttp
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
EXPOSE 8080
CMD ["./main"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment