tardis icon indicating copy to clipboard operation
tardis copied to clipboard

Create Dockerfile and docker workflow

Open epassaro opened this issue 2 years ago • 7 comments

Description

  • Adds a Dockerfile with a fully functioning TARDIS.
  • Adds a workflow to build and push Docker images of TARDIS repo with the labels: master (latest changes, gets overwritten on every push to master), <tag-name> (on release), and latest (points to latest tag, on release).

Motivation and context

Run TARDIS everywhere.

How has this been tested?

  • [ ] Testing pipeline
  • [x] Other

Locally build and run the Docker image:

docker build . -t tardis-rt/tardis:latest
docker run -p 8888:8888 tardis-rt/tardis:latest

To re-start an exited container, first check the NAMES field of your container with docker ps -a and then

docker start -ia <container_name>

Examples

Type of change

  • [ ] Bug fix
  • [x] New feature
  • [ ] Breaking change
  • [ ] None of the above

Checklist

  • [ ] I have updated the documentation according to my changes
  • [ ] I have built the documentation by applying the build_docs label to this pull request (if you don't have enough privileges a reviewer will do it for you)
  • [x] I have requested two reviewers for this pull request

epassaro avatar May 18 '22 23:05 epassaro

Codecov Report

Merging #2029 (c10f2ee) into master (958664e) will not change coverage. The diff coverage is n/a.

:exclamation: Current head c10f2ee differs from pull request most recent head 26c03be. Consider uploading reports for the commit 26c03be to get more accurate results

@@           Coverage Diff           @@
##           master    #2029   +/-   ##
=======================================
  Coverage   71.96%   71.96%           
=======================================
  Files         137      137           
  Lines       12514    12514           
=======================================
  Hits         9006     9006           
  Misses       3508     3508           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar May 18 '22 23:05 codecov[bot]

I don't know very much about Docker, I'll try this out when I get the time

andrewfullard avatar May 26 '22 14:05 andrewfullard

I don't know very much about Docker, I'll try this out when I get the time

Great, tell me if you have any doubt.

Do you know someone in TARDIS that knows about Docker and should be a reviewer of this PR?

epassaro avatar May 26 '22 19:05 epassaro

I don't know very much about Docker, I'll try this out when I get the time

Great, tell me if you have any doubt.

Do you know someone in TARDIS that knows about Docker and should be a reviewer of this PR?

I do not. You should ask on Slack.

andrewfullard avatar May 31 '22 14:05 andrewfullard

*beep* *bop*

Hi, human.

The docs workflow has failed :x:

Click here to see the build log.

tardis-bot avatar Jun 08 '22 15:06 tardis-bot

This is a very great addition @epassaro tada

I tried running it locally - it works perfectly except I had to install curl otherwise quickstart notebook wasn't able to download tardis_example.yml. Perhaps, we can add following step in dockerfile:

RUN apt-get update && apt-get install -y \
curl

But I understand if we don't since quickstart notebook isn't the only thing container users are gonna use. As you know better, it's your call whether we should add this or not, hence I'm approving it!

That's why I'm changing the curl command to wget in #2042. wget is always present in minimal Docker images and VMs while curl is usually not. Installing curl will bloat the image with ~500MB, and since the Quickstart is there just to show TARDIS is fully functional I don't think it's worth it.

epassaro avatar Jun 09 '22 13:06 epassaro

This is a very great addition @epassaro tada I tried running it locally - it works perfectly except I had to install curl otherwise quickstart notebook wasn't able to download tardis_example.yml. Perhaps, we can add following step in dockerfile:

RUN apt-get update && apt-get install -y \
curl

But I understand if we don't since quickstart notebook isn't the only thing container users are gonna use. As you know better, it's your call whether we should add this or not, hence I'm approving it!

That's why I'm changing the curl command to wget in #2042. wget is always present in minimal Docker images and VMs while curl is usually not. Installing curl will bloat the image with ~500MB, and since the Quickstart is there just to show TARDIS is fully functional I don't think it's worth it.

Sounds good @epassaro!

jaladh-singhal avatar Jun 09 '22 17:06 jaladh-singhal

Closed in favor of PR #2569.

Knights-Templars avatar Apr 19 '24 14:04 Knights-Templars