Skip to content

DotBlack/docker_go_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker_go_sample

This repository is for learing porposes.
It's a minimal out of the box docker sample.

Files:
Dockerfile: describes docker instructions
src/main.go: serverside application (simple echo server)

Create a image named "docker_go_sample" from the Dockerfile:
docker build -t docker_go_sample .

Description:
docker build = default command to build a image
-t = tag = name for the image
. = take everything in the build directory (current filepath)

Run a docker-container based on the previously built image:
docker run -p 3000:3000 -d docker_go_sample

Description:
docker run = default command to run a container
-p = port = binds port 3000 of the container (left side) to the port 3000 of the host (right side)
-d = detached mode = does not block console interaction (background task)

Visit the application:
http://localhost:3000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published