Files
mengyastore/mengyastore-backend-go/Dockerfile
2026-05-16 19:03:36 +08:00

18 lines
511 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 运行镜像仅包含 Alpine + 预编译二进制。
# 请在 Windows 上先执行 dist\build-linux-amd64.bat生成 dist/mengyastore-backend-linux-amd64
# 再将本目录同步到服务器并在服务器执行 docker build无需在服务器安装 Go
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY dist/mengyastore-backend-linux-amd64 ./mengyastore-backend
RUN chmod +x ./mengyastore-backend
EXPOSE 8080
ENV GIN_MODE=release
CMD ["./mengyastore-backend"]