Skip to content

Example of customizing Nextstrain's Docker image

Notifications You must be signed in to change notification settings

victorlin/nextstrain-custom-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a custom Docker image for Nextstrain

Update 2024-06-07: Much of this repo has been reworked into a template repo victorlin/github-actions-docker-build with a more generalized scoping of "building and publishing a Docker image on GitHub".

Background

Nextstrain's Docker image provides software tooling that supports most use cases, however there are times when one wants to use software that is not included in that image. This repository demonstrates how to create your own image.

Something similar was requested on the Nextstrain discussion forum.

1. Setup

Fork this repository, or add all its contents into an existing repository. You will need a GitHub account to continue.

2. Customize the image

The Dockerfile defines customizations to Nextstrain's image. The method used varies by software. Refer to Docker Docs or look at Nextstrain's Dockerfile for examples.

Once the Dockerfile has been updated on GitHub, it will automatically trigger a build of the image on GitHub Container Registry as an image tagged with the repository's name and owner.

Note

The first push in a repository may fail due to lack of GitHub permissions on a package that hasn't been created yet. Subsequent pushes should succeed.

3. Use the image

Use the image with Nextstrain CLI by specifying it as --image in supported commands. --docker is required if it is not your default runtime. Examples:

nextstrain build --docker --image=ghcr.io/victorlin/custom-docker .

nextstrain shell --docker --image=ghcr.io/victorlin/custom-docker .

Note

You can also build it locally if you have Docker installed. Example:

./build --load --tag custom-local-image
nextstrain shell --docker --image=custom-local-image .

References

Based on work in https://github.com/nextstrain/docker-base.

About

Example of customizing Nextstrain's Docker image

Resources

Stars

Watchers

Forks

Packages