You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kratos/examples/traces/Dockerfile

30 lines
647 B

FROM golang:1.15 AS builder
COPY . /src
COPY ../ /src
WORKDIR /src/app/message
RUN GOPROXY=https://goproxy.cn go build -o ./bin/message ./...
WORKDIR /src/app/user
RUN GOPROXY=https://goproxy.cn go build -o ./bin/user ./...
FROM debian:stable-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
netbase \
&& rm -rf /var/lib/apt/lists/ \
&& apt-get autoremove -y && apt-get autoclean -y
COPY --from=builder /src/app/message/bin /app
COPY --from=builder /src/app/user/bin /app
COPY --from=builder /src/start.sh /app
EXPOSE 8000
EXPOSE 9000
ENTRYPOINT ["sh","/app/start.sh"]