Docker changie development image to help to contribute #400
-
Hello, A docker image of changie with all tools ( I was in trouble to install on my plaform hugo-extended due to comment https://gohugo.io/getting-started/installing#debian-and-ubuntu, because I've Ubuntu 18..04 LTS |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Are you expecting a dockerfile in the repo or just an example of what one would look like? |
Beta Was this translation helpful? Give feedback.
-
I was working on this today and got a basic dockerfile to work, combining this with a binding mount of your local directory should get you started. I am not quite sure I want to support this environment officially as it is not something I would use or even recommend. FROM golang:1.18
WORKDIR /app
# Install tools
RUN go install golang.org/x/tools/cmd/goimports@latest &&
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1 &&
go install -tags extended github.com/gohugoio/hugo@latest docker build -t changie:dev . -f dev.Dockerfile # or whatever name you give it
docker run --mount type=bind,source="$(pwd)",target=/app changie:dev make test # run unit tests
docker run --mount type=bind,source="$(pwd)",target=/app -p 1313:1313 -it changie:dev hugo serve -s docs --bind=0.0.0.0 # is the full command to run hugo FYI @llaville |
Beta Was this translation helpful? Give feedback.
-
If it would be useful I could contribute a little here with a devcontainer, unless it's desired to run completely locally. If locally with only dockerized commands I actually have Magefiles that are ready and been using for a while I could add for hugo serve, docker build etc. That means you drop into the repo and as long as you have go + mage (go install it) you can Big fan of it and comes standard in almost all my projects now. Nice accelerator for contributing too. |
Beta Was this translation helpful? Give feedback.
I was working on this today and got a basic dockerfile to work, combining this with a binding mount of your local directory should get you started. I am not quite sure I want to support this environment officially as it is not something I would use or even recommend.