Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker support #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pataquets
Copy link

@pataquets pataquets commented Dec 19, 2019

Add Dockerfile to enable image building. Useful for development and tests under Docker workflow.
Using the official Golang image, latest tag. More info at https://hub.docker.com/_/golang/.
No Golang install needed on systems with Docker, both for running or for developing/testing.

Just adding files, setting working dir and running build instructions, nothing fancy here.

Build:

$ docker build -t go-peerflix .

Run:

$ docker run --rm -it -p 8080:8080 go-peerflix [other options...]

Using the -pswitch to open/map ports. Add as many -poptions as needed. Alternatively, you can use --net=host to give the container full access to the local networking stack, instead of mapping ports.

FYI, there's a still quicker to test, already built image on my Docker Hub. Test it by running:

$ docker run --rm -it -p 8080:8080 pataquets/go-peerflix-src [other options...]

CTRL+C'ing stops it. Using --rm causes the container to be deleted after running.

Optional improvement to come (maybe in another issue):

  • Create an 'official', based on your repo, automated build at Docker Hub for the image: https://docs.docker.com/docker-hub/builds/ . Just requires a free paid Docker Hub account and a following a quick 'Create automated build' process. I'll be happy to help on it, if needed. This would add an easy, container-friendly distribution method and can also provide a kind of 'daily' test builds. Both stable and latest/edge/dev versions are possible via branches/tags.

@pataquets
Copy link
Author

@Sioro-Neoku ping

@pataquets
Copy link
Author

@Sioro-Neoku: judging by the project activity, you might be interested in https://adoptoposs.org/ or https://www.codeshelter.co/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant