FROM golang:1.23-alpine AS builder WORKDIR /app COPY . . #RUN echo "export GOPROXY=https://goproxy.io/" >> ~/.bashrc RUN export GOPROXY=https://goproxy.io/ && go mod tidy RUN go build -o test ./worker/service/main.go FROM alpine WORKDIR /app ENV REDIS_HOST="172.17.0.1:6379" SERVER_PORT="6600" #ENV SERVER_PORT="6600" COPY --from=builder /app/test /usr/bin/worker EXPOSE $SERVER_PORT #ENTRYPOINT ["worker"] CMD ["sh","-c","worker --port :$SERVER_PORT --redis $REDIS_HOST"] #CMD worker --port :$SERVER_PORT --redis $REDIS_HOST