Docker
Besides the CLI package, YAMLResume also provides a docker image for easy onboarding.
As we've documented, you can run yamlresume docker container with the following command:
docker run --rm -v $(pwd):/app -w /app yamlresume/yamlresume <command>
However if you are interested, you can customize the Docker image to suit your needs.
Build Docker Image
YAMLResume's Docker image is defined and generated in two phases:
Dockerfile.base
Dockerfile.base contains the base environment for running YAMLResume, including all necessary dependencies like XeTeX from TeX Live and Google Noto Font.
This is a base image mostly used for accelerating the build process on Github
Actions—installing texlive by apt install texlive-xetex
thing takes about 30
minutes,
which is too long to run for every docker build, so that we decided to build and
publish this base image
once and re-use this for
every further build.
Generally you don't need to build this image yourself, you can just reuse the published image on dockerhub.
Dockerfile
Dockerfile
defined how yamlresume/yamlresume
image is built, it is very simple and
straightforward, just installed yamlresume
from npmjs by npm install -g yamlresume@latest
and create necessary users and groups as per Docker's
security best
practices.
Building the yamlresume image locally is a trivial task. You just need to run
docker build -t yamlresume/yamlresume .
You may need to take a look at docker multi-platform build if you, for example, run into issues building docker images for different architectures.
I wrote some tips on X, you can take a look if you are interested.
Last updated on