For local development
- sudo chown -R ubuntu go-gateway/
- Build the dev container with tag name ipns-gateway-local docker build --target dev . -t ipns-gateway-local
- Run the image in interactive terminal mode "-it" , with volume mount "-v
${PWD}:/work", with entry point as shell terminal "sh" docker run -it -v $ {PWD}:/work -p 8888:8888 ipns-gateway-local sh - mkdir app
- cd app
- go mod init github.com/ipns-link/go-gateway/app
- create a app.go
For build
- Build the build container with tag name ipns-gateway-build sudo docker build --target build . -t ipns-gateway-build
For deployment
- Build the build container with tag name ipns-gateway sudo docker build --target runtime . -t ipns-gateway sudo docker build . -t ipns-gateway
attach to running docker docker exec -it "name of the container" sh