This repository contains Docker images for the Volta JavaScript tool manager.
latest
,latest-bookworm
,2.0.1
,2.0.1-bookworm
latest-bullseye
,2.0.1-bullseye
latest-slim
,latest-bookworm-slim
,2.0.1-slim
,2.0.1-bookworm-slim
latest-bullseye-slim
,2.0.1-bullseye-slim
This list won't be updated as frequently as the tags. Check this page for all available tags.
This image is built for amd64
and arm64
.
All Node.js versions supported by Volta are supported by this image. Always make sure to pin a Node.js version in your package.json
file. Learn more about pinning Node.js versions here.
To quote their website:
The Hassle-Free JavaScript Tool Manager.
I can't say it better than that.
Create a Dockerfile
in your project directory with the following content:
# You can specify the version of volta you want to use by changing the tag
FROM marcaureln/volta:latest
# Make sure to have a Node.js version pinned in your package.json (use `volta pin node` to pin a version)
COPY package.json ./
COPY package-lock.json ./
# Install dependencies using the pinned npm or yarn version
RUN npm install
# Copy the rest of your application
COPY . .
# Run your application
CMD ["npm", "start"]
Then build the Docker image:
docker build -t my-nodejs-app .
And run it:
docker run --rm -it my-nodejs-app
The marcaureln/volta
images come in several flavors. The latest
tag is always the latest version of Volta with the latest stable Debian version.
The <version>
refers to the Volta version you want to use. Version >= 2.0.0
are supported. When using this tag, the image will be based off of the latest stable Debian version.
The <flavor>
refers to the Debian version you want to use. The tags are based off of Debian's buildpack-deps images. The following flavors are available: bookworm
, bullseye
. Thereby, the following tags are available: <version>-bookworm
, <version>-bullseye
.
The slim variant is based off of Debian's slim images. The same flavors are available: bookworm
, bullseye
. Thereby, the following tags are available: <version>-bookworm-slim
, <version>-bullseye-slim
.
Volta does not support Alpine Linux yet. See volta-cli/volta#473 for more information.
This Docker image is inspired by Michal Bryxí's article.
Special thanks to the Volta team for creating such a great tool.
This project is licensed under the MIT license.