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 Dockerfile #31

Merged
merged 1 commit into from
Apr 6, 2015
Merged

Add Dockerfile #31

merged 1 commit into from
Apr 6, 2015

Conversation

discordianfish
Copy link
Contributor

Hi,

this Dockerfile builds a peerflix-server Docker image. I've added my fork to my hub account: https://hub.docker.com/u/fish/peerflix-server

If you're up for it, I'd suggest you sign up as well so you can provide official images.
Using this image is as simple as running:

docker run -p 9000:9000 fish/peerflix-server

You can always build the image locally by running docker build -t peerflix-server . in this repo.

@asapach
Copy link
Owner

asapach commented Apr 3, 2015

I think it would be more efficient to install the package from NPM rather than building it from source. Also, I would probably add forever support and maybe an upstart script if it makes sense for docker.

@discordianfish
Copy link
Contributor Author

@asapach The nice thing about building from souce is that the docker image automatically gets updated when someone pushes change to peerflix-server.
Using upstart in general is discouraged since a container should ideally just run one application and forever isn't really necessary, since docker can take care of restarting failed containers (see docker run --restart).

@asapach
Copy link
Owner

asapach commented Apr 3, 2015

Next question: you probably would want to move the torrent storage(/tmp/torrent-stream) outside of the container into a separate volume.

@asapach
Copy link
Owner

asapach commented Apr 5, 2015

Next question: you probably would want to move the torrent storage(/tmp/torrent-stream) outside of the container into a separate volume.

And maybe also the config folder:~/.config/peerflix-server/

@discordianfish
Copy link
Contributor Author

@asapach I would keep ~/.config/peerflix-server in the container. If people need to customize the config, they can either create their custom docker image based off this image like this (with my fork as example)

FROM fish/peerflix-server
ADD config/ /home/app/.config/peerflix-server

Or they can bind-mount a directory from host with a config like this:

docker run -v path/to/config:/home/app/.config/peerflix-server ...

asapach added a commit that referenced this pull request Apr 6, 2015
@asapach asapach merged commit d8b45ae into asapach:master Apr 6, 2015
@asapach
Copy link
Owner

asapach commented Apr 6, 2015

Thanks, merged. I'll need to play with this.

@asapach
Copy link
Owner

asapach commented Apr 6, 2015

Created the Docker repo: https://registry.hub.docker.com/u/asapach/peerflix-server/

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.

None yet

2 participants