Build locally not in docker
This commit is contained in:
parent
624f8f46ba
commit
caed30d2f6
@ -1,21 +1,8 @@
|
||||
# base go image
|
||||
FROM golang:1.22-alpine as builder
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN CGO_ENABLED=0 go build -o brokerApp ./cmd/api
|
||||
|
||||
RUN chmod +x /app/brokerApp
|
||||
|
||||
# build a tiny docker image
|
||||
FROM alpine:latest
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
COPY --from=builder /app/brokerApp /app
|
||||
COPY brokerApp /app
|
||||
|
||||
CMD ["/app/brokerApp"]
|
||||
|
Loading…
Reference in New Issue
Block a user