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

Docker Support #13

Closed
merbla opened this issue Mar 23, 2018 · 10 comments
Closed

Docker Support #13

merbla opened this issue Mar 23, 2018 · 10 comments
Assignees

Comments

@merbla
Copy link
Contributor

@merbla merbla commented Mar 23, 2018

Hi,

Great package! Just wondering if you would be interested in PR for Docker support to help on boarding of new users.

Details over at my branch.

Initially setup with RStudio

docker build -t fitzroy/rstudio -f docker/rstudio/Dockerfile .
....
docker run -d -p 8787:8787 fitzroy/rstudio
....
open localhost:8787 

image

If you are keen I would also suggest

  • TravisCI for builds (R & Docker) to keep the images up to date
  • Pushing images to DockerHub

Cheers!

@jimmyday12
Copy link
Owner

@jimmyday12 jimmyday12 commented Mar 23, 2018

Hi @merbla.

Cheers for reaching out! We are open to anything that makes the package better for people. You can probably tell by our code that we are pretty new to this though - can you point us to some info on Docker and what it does?

Cheers

@merbla
Copy link
Contributor Author

@merbla merbla commented Mar 23, 2018

Hey @jimmyday12,

Sure! For myself Docker or containers sometimes is helpful when you want people to use your software regardless of operating system. It allows them to run Docker as a container service regardless if they are using a different operating system.

For example I was not sure if there was a particular operating systems you were thinking of targeting. In my case I run OSX & Windows so depending on what dependencies Fitzroy requires it can be hard to get working on all the Linux variants.

Some notes on Docker & containers are below:

One other question. Were you thinking of pushing this package to CRAN?

@jimmyday12
Copy link
Owner

@jimmyday12 jimmyday12 commented Mar 24, 2018

Hi @merbla - thanks for the info. It's not something we'd thought about at all so would be open to a PR to add support.

Our initial plan had been to put it on CRAN but since starting, we've realized the structure of the package may have to change a bit for that. Do you have experience submitting to CRAN?

@jimmyday12 jimmyday12 self-assigned this Apr 5, 2018
@merbla
Copy link
Contributor Author

@merbla merbla commented May 10, 2018

@jimmyday12 never submitted to CRAN myself. Happy to help out where I can.

Some more handy links on Docker...

👍

@merbla
Copy link
Contributor Author

@merbla merbla commented Jul 5, 2018

I've created a docker setup (that builds on each commit via CircleCI) over at this repo. Happy to migrate to this repository so everything lives in one place.

Might have to step you through setting up the DockerHub/CircleCI stuff.

Thoughts?

@jimmyday12
Copy link
Owner

@jimmyday12 jimmyday12 commented Jul 5, 2018

Hi mate - awesome to see other people using this! Certainly open to it once I get my head around Docker. I have in the last few weeks setup TravisCI and got that working. Is CircleCI the same thing? Would it work with your setup?

https://travis-ci.org/jimmyday12/fitzRoy

@merbla
Copy link
Contributor Author

@merbla merbla commented Jul 6, 2018

Yep, so CircleCi is similar to TravisCI (Both are build/continuous integration systems) however it might be best to keep Travis for publishing the CRAN/R Package and CircleCI for the Docker image. You could do it all in Travis however the .travis.yml would get a little complicated. Travis and CircleCI can live side by side no worries.

The setup works in a similar way to what you already have, we just add the config into .circleci/config.yml.

Currently I have the image publishing as thetinytechco/fitzroy:rstudio however I think we can change to jimmyday12/fitzRoy:rstudio.

@jimmyday12
Copy link
Owner

@jimmyday12 jimmyday12 commented Sep 4, 2018

Hi mate - just got around to looking at this. Happy for you to step me through setting it up as you mentioned above! There has been a couple changes since you implemented it, not sure if that changes much from your end. Let me know the best way to move forward.

@merbla
Copy link
Contributor Author

@merbla merbla commented Sep 4, 2018

Ok, here is a brain dump for what you will need to do:

  • Setup an account on DockerHub - https://hub.docker.com/
  • Create a project or organisation in DockerHub where you want the image pushed to. ( I have an org called thetinytechco e.g. https://hub.docker.com/r/thetinytechco/fitzroy/)
  • Create an account at https://circleci.com/
  • Add the configuration .circleci/config.yml
  • Add environment variables for the DockerHub credentials in the CircleCi portal/site so that you can push the image to DockerHub. (you do not want these public!)

In short the flow will be:

  • Commit a change
  • CircleCI builds Docker Image
  • CircleCI pushes image to DockerHub

Ping me when you get the account setup and I can help with a PR if needs be.

@jimmyday12
Copy link
Owner

@jimmyday12 jimmyday12 commented Sep 4, 2018

Ok great, I setup the accounts

Probably just need a hand with
a) What to put in this circlci config.yml file (e.g. yours is https://github.com/TheTinyTechCompany/fitzroy-docker/blob/master/.circleci/config.yml)
b) how to do the environment variables. I can see where to put them but just unsure what I should be putting there

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.