Docker development environment for Golang and Node.js
188
This is a base golang and Node.js development image. It's based on the golang:X.XX-alpineX.XXimage and extedned by the following applications:
The image can be extended to start multiple watch jobs in separate tmux windows.
Files can be foound in example
FROM xdevbase/go-nodejs:v1.14-v12
COPY ./overlay /
Execute: docker build --tag app/develop:1.0 .
The entrypoint script will source all scrips in the folder entrypoint.d and bellow. The scrips just need a the bash shebang #!/bin/bash. The execution is ordered by sort.
|____overlay
| |____etc
| | |____entrypoint.d
| | | |____1-app
| | | | |____run
| | | |____2-sass
| | | | |____run
#!/bin/bash
tmux new-window -t "$SESSION_NAME:1" -n "server" \
watchexec -e go -r -s SIGKILL go run .
#!/bin/bash
tmux new-window -t "$SESSION_NAME:2" -n "sass" \
npm run sass-watch
docker run -it --rm \
-v $(CURDIR):/go/src/github.com/app \
-w /go/src/go/src/github.com/app \
app/develop:1.0

xdevbase/go-nodejs:v1.14-v12GOPROXY = direct
Fork -> Patch -> Push -> Pull Request
MIT
Copyright © 2020 Thomas Harr <https://www.xdevcloud.de>
docker pull xdevbase/go-nodejs:v1.14-v12