Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

要不考虑一下做个docker容器,放在package里面,方便直接用? #63

Open
Musicminion opened this issue Mar 2, 2024 · 0 comments

Comments

@Musicminion
Copy link

Musicminion commented Mar 2, 2024

可以做个Docker容器,或者完善一下Docker部分的文档(方便一下使用docker作为开发的开发者呗),这里放一个我自己用的dockerfile供参考(

感谢作者啦!

# Use Dockerfile to Build Dev Environment(support hot reload)
# Base image
FROM golang:1.22

# Set the working directory
# --------------------
WORKDIR /app

# COPY file
# --------------------
COPY go.mod .
COPY go.sum .


# Config Proxy
# --------------------
RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct
# https://mirrors.aliyun.com/goproxy/,direct

# Install dependences
# --------------------
RUN go mod download
RUN export GOPATH=/go && go install github.com/silenceper/gowatch@latest && ls -al /go/bin
# go install github.com/silenceper/gowatch@latest


# Add /go/bin to PATH
# --------------------
ENV PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/go/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant