fix: add missing cd in Dockerfile
This commit is contained in:
parent
a391b19b7e
commit
2055429e2a
|
@ -1,6 +1,6 @@
|
|||
FROM golang:1.19.1-alpine3.16 as builder
|
||||
|
||||
WORKDIR /root
|
||||
WORKDIR /twhelp
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
@ -9,14 +9,14 @@ RUN apk --no-cache add make
|
|||
|
||||
COPY . .
|
||||
RUN make generate
|
||||
RUN CGO_ENABLED=0 go build -trimpath -o twhelp .
|
||||
RUN cd /twhelp && CGO_ENABLED=0 go build -trimpath -o twhelp .
|
||||
|
||||
######## Start a new stage from scratch #######
|
||||
FROM alpine:3.16
|
||||
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
COPY --from=builder /root/twhelp /usr/bin/
|
||||
COPY --from=builder /twhelp/twhelp /usr/bin/
|
||||
|
||||
EXPOSE 9234/tcp
|
||||
|
||||
|
|
Reference in New Issue
Block a user