A docker image for developing Node.js and Python web projects.
100K+
https://github.com/canonical/dotrun-image
Docker imageThis project is a docker image for developing Node.js and Python web projects. It is an essential tool for the Canonical web team local development.
dotrun-docker is a Python package inside the Docker image. It simplifies running Canonical web projects:
package.json script entrypoints:
dotrun runs yarn run startdotrun foo runs yarn run foopackage.json and only run yarn install when neededrequirements.txt and only run pip3 install when needed.env and .env.local files.venv in the project folder for easy accessBefore running this image locally, you should know that it is an essential part of dotrun, our python package for running Canonical websites. If you are interested in running our web projects, visit our dotrun repository.
If you prefer to access this image directly and work on it, then you can run it and access a bash environment with:
docker run -it canonicalwebteam/dotrun-image:latest /bin/bash
These are the dotrun-docker commands available inside our image:
$ dotrun # Install dependencies and run the `start` script from package.json
$ dotrun clean # Delete `node_modules`, `.venv`, `.dotrun.json`, and run `yarn run clean`
$ dotrun install # Force install node and python dependencies
$ dotrun exec # Start a shell inside the dotrun environment
$ dotrun exec {command} # Run {command} inside the dotrun environment
$ dotrun {script-name} # Install dependencies and run `yarn run {script-name}`
$ dotrun -s {script} # Run {script} but skip installing dependencies
$ dotrun --env FOO=bar {script} # Run {script} with FOO environment variable
To QA any changes to this image, you probably want to build a local image with Docker:
docker build . --tag canonicalwebteam/dotrun-image:local
You should probably create a virtualenv, and then install dotrun-docker.
pip uninstall dotrun-docker
cd src
pip install .
dotrun-image can be used with dotrun 2.3.0 by building a docker image, and specifying the local image name when running dotrun, for example:
docker build . --tag canonicalwebteam/dotrun-image:local
cd snapcraft.io
dotrun --image canonicalwebteam/dotrun-image:local install
dotrun --image canonicalwebteam/dotrun-image:local serve
Changes to the default branch will trigger a new release using GitHub Actions.
Update the version in setup.py, and push the changes to a new branch called release/<version> e.g release/1.2.0-rc1. This will trigger a new release and publish the tagged image to dockerhub.
You can then pull the published image using
docker pull canonicalwebteam/dotrun-image:1.2.0-rc1
Content type
Image
Digest
sha256:c50774180…
Size
567.2 MB
Last updated
11 months ago
docker pull canonicalwebteam/dotrun-image