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

Speed up workflows with Docker images #95

Open
redeboer opened this issue Jan 20, 2023 · 3 comments
Open

Speed up workflows with Docker images #95

redeboer opened this issue Jan 20, 2023 · 3 comments
Labels
🖱️ DX Improvements to the Developer Experience

Comments

@redeboer
Copy link
Member

redeboer commented Jan 20, 2023

APT installs are time consuming, see for instance this log. It can be sped up by creating a Docker container on hub.docker.com/orgs/compwa and pulling it in the workflow with container.image.


Example for that specific log (2m48s).

  1. Create a Dockerfile:

    FROM python:3.8
    RUN apt-get -y update
    
    # https://serverfault.com/a/992421
    RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
    RUN apt-get -y install inkscape latexmk make texlive-fonts-extra texlive-xetex xindy
    
    RUN apt-get autoclean -y
    RUN apt-get autoremove -y
    RUN rm -rf /var/lib/apt/lists/*
  2. Build the image and push to Docker Hub:

    REPO=polarimetry
    JOB=fast-pdf
    docker build -t compwa/$REPO-$JOB .
    docker push compwa/$REPO-$JOB

This workflow was sped up by two minutes, see this log (57s container initialisation).

@redeboer redeboer added the 🖱️ DX Improvements to the Developer Experience label Jan 20, 2023
@redeboer redeboer self-assigned this Jan 20, 2023
@redeboer redeboer changed the title Speed up apt install in workflows with Docker images Speed up workflows with Docker images Jan 26, 2023
@redeboer
Copy link
Member Author

Unfortunately, Docker is retiring its Free Team organization tier as of April 14th, 2023.
https://web.docker.com/rs/790-SSB-375/images/privatereposfaq.pdf

@redeboer redeboer closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2023
@redeboer
Copy link
Member Author

The plan to sunset Free Team has been reverted 🎉
image

@redeboer redeboer reopened this Mar 26, 2023
@redeboer
Copy link
Member Author

But better: use https://ghcr.io instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖱️ DX Improvements to the Developer Experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant