HUB
Sign inSign up

xdevbase/go-nodejs

By xdevbase

•Updated about 6 years ago

Docker development environment for Golang and Node.js

Image
0

188

xdevbase/go-nodejs repository overview

⁠Go-Nodejs

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:

  • bash
  • su-exec
  • tmux
  • make
  • git
  • nodejs
  • npm
  • watchexec

The image can be extended to start multiple watch jobs in separate tmux windows.

⁠Example usage

Files can be foound in example⁠

⁠Minimal Dockerfile
FROM xdevbase/go-nodejs:v1.14-v12

COPY ./overlay /

Execute: docker build --tag app/develop:1.0 .

⁠Examle folder structure

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
⁠Example run script
⁠/etc/entrypoint.d/1-app/run
#!/bin/bash

tmux new-window -t "$SESSION_NAME:1" -n "server" \
    watchexec -e go -r -s SIGKILL go run .
⁠/etc/entrypoint.d/2-sass/run
#!/bin/bash

tmux new-window -t "$SESSION_NAME:2" -n "sass" \
    npm run sass-watch
⁠Example docker run
docker run -it --rm \
		-v $(CURDIR):/go/src/github.com/app \
		-w /go/src/go/src/github.com/app \
		app/develop:1.0

Example windows

⁠Versions

  • v1.14-v12⁠ golang version 1.14 and Node.js version 12 available as xdevbase/go-nodejs:v1.14-v12

⁠Volumes

  • None

⁠Ports

  • None

⁠Available environment variables

GOPROXY = direct

⁠Contributing

Fork -> Patch -> Push -> Pull Request

⁠Authors

⁠License

MIT

Copyright © 2020 Thomas Harr <https://www.xdevcloud.de>
Tag summary
Recent tags
Content type
Image
Digest
Size
132.1 MB
Last updated
about 6 years ago
docker pull xdevbase/go-nodejs:v1.14-v12