...
|
...
|
@@ -5,7 +5,7 @@ ENV GO111MODULE on |
|
|
|
|
|
RUN git clone http://gitlab.fjmaimaimai.com/mmm-go/gocomm.git /app/gocomm
|
|
|
|
|
|
WORKDIR /app/ability
|
|
|
WORKDIR /app/opp
|
|
|
|
|
|
COPY go.mod .
|
|
|
COPY go.sum .
|
...
|
...
|
@@ -13,7 +13,7 @@ RUN go mod download |
|
|
|
|
|
COPY . .
|
|
|
|
|
|
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o ability main.go
|
|
|
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go
|
|
|
|
|
|
#FROM scratch
|
|
|
FROM alpine:latest
|
...
|
...
|
@@ -22,7 +22,7 @@ RUN apk add --no-cache tzdata \ |
|
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
|
|
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
|
|
|
WORKDIR /root/
|
|
|
COPY --from=builder /app/ability .
|
|
|
COPY --from=builder /app/opp .
|
|
|
#RUN ls -l
|
|
|
EXPOSE 8080
|
|
|
CMD ["./ability"] |
|
|
\ No newline at end of file |
|
|
EXPOSE 8082
|
|
|
CMD ["./opp"] |
|
|
\ No newline at end of file |
...
|
...
|
|