Bill-Gray / find_orb

Orbit determination from observations
https://www.projectpluto.com/find_orb.htm
GNU General Public License v2.0
97 stars 45 forks source link

Add support for Docker #27

Closed moeyensj closed 4 years ago

moeyensj commented 4 years ago

Hey Bill,

This pull request adds three shell scripts to help manage the download, install, and uninstall of find_orb and its dependencies. I've also added a Dockerfile which tells docker how to build a container in which find_orb can run.

For the shell scripts: After a user has downloaded this repository they can download the lunar, miscell, jpl_eph, and sat_code repositories with: /bin/bash DOWNLOAD.sh -d .. Once that is done, everything can be built and compiled with: /bin/bash INSTALL.sh -d .. -u And lastly, if find_orb needs to be uninstalled: /bin/bash UNINSTALL.sh -d .. -g

For docker: After a user has downloaded this repository, they can also build a docker container with: docker image build -t find_orb:latest .

One thing to note: this command will only complete successfully once the Dockerfile and the shell scripts are included on find_orb's master. The Dockerfile uses the INSTALL.sh and DOWNLOAD.sh shell scripts to keep the installation process confined to a single set of files.

With the image built, a container with find_orb ready to go can be run with: docker container run -it find_orb:latest

In the container, find_orb's executables are already added to the path and so can be run immediately. For example:

┌─(base)[moeyensj][docker ?:1 ✗][~/repos/forked/find_orb/find_orb]
└─▪ docker container run -it --rm find_orb:dev
root@ef34340e0d2f:/# fo  
'fo' needs the name of an input file of MPC-formatted
astrometry as a command-line argument.

Let me know your thoughts, questions, or concerns. Another thing that might be good to look into would be creating an account on https://hub.docker.com/ and then linking this repository with your account on there. That way find_orb can be run in a container without needing to download this repository.

Bill-Gray commented 4 years ago

Hi Joachim,

Thank you! I see no reason not to just pull this "as is"; it doesn't conflict with anything already in the repo.

I'll take a shot at getting it going on docker.com. Currently waiting for the confirmation e-mail to get to me.

moeyensj commented 4 years ago

Awesome! I can test the docker hub integration once that's up and running and report back. I just tried doing a repository clone and then using the Dockerfile to build a find_orb container and it all worked as intended.