Last active
September 7, 2019 14:04
-
-
Save phuctm97/249b44be2966f059c16208481ab37a0e to your computer and use it in GitHub Desktop.
Go RESTful series
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get repo absolute location for mounting into the container. | |
local_workdir=$(cd $(dirname $(dirname "${BASH_SOURCE[0]}")) >/dev/null 2>&1 && pwd) | |
main() { | |
# Working directory inside the container. | |
local container_workdir=/go/src/github.com/the-evengers/go-restful | |
# Identifying container name. | |
local container_name=go-restful | |
docker run --rm -it \ | |
--name $container_name \ | |
--volume $local_workdir:$container_workdir \ | |
--workdir $container_workdir \ | |
golang | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment