Code Monkey home page Code Monkey logo

dotrun-image's Introduction

dotrun Docker image

This 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.

Image Features

  • Based on ubuntu:focal
  • Python 3.8
  • Node 20 LTS
  • Yarn
  • dotrun-docker

dotrun-docker:

dotrun-docker is a Python package inside the Docker image. It simplifies running Canonical web projects:

  • Make use of standard package.json script entrypoints:
    • dotrun runs yarn run start
    • dotrun foo runs yarn run foo
  • Detect changes in package.json and only run yarn install when needed
  • Detect changes in requirements.txt and only run pip3 install when needed
  • Run scripts using environment variables from .env and .env.local files
  • Keep python dependencies in .venv in the project folder for easy access

Usage

Before 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

Building/Testing

To QA any changes to this image, you probably want to build a local image with Docker:

docker build . --tag canonicalwebteam/dotrun-image:local

Releasing

Changes to the default branch will trigger a new release using GitHub Actions.

Auto-releases

This image is automatically built and released every month. This is to ensure dependencies are up to date on local development when using dotrun.

dotrun-image's People

Contributors

anthonydillon avatar edlerd avatar huwshimi avatar jkfran avatar nottrobin avatar petermakowski avatar renovate-bot avatar samhotep avatar steverydz avatar willmoggridge avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotrun-image's Issues

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update dependency ubuntu to v22

Detected dependencies

dockerfile
Dockerfile
  • ubuntu focal

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.