Skip to content

A container definition that will act as a local development environment

License

Notifications You must be signed in to change notification settings

mathew-fleisch/docker-dev-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Development Environment

Release CI: multi-arch container build & push Update CI: asdf dependency versions Docker Hub

A container definition that will act as a local development environment

Usage

Quick start: Add start/stop helper scripts to /usr/local/bin

wget https://raw.githubusercontent.com/mathew-fleisch/docker-dev-env/main/scripts/dockstart -q -O /usr/local/bin/dockstart
wget https://raw.githubusercontent.com/mathew-fleisch/docker-dev-env/main/scripts/dockstop -q -O /usr/local/bin/dockstop
chmod +x /usr/local/bin/dockstart
chmod +x /usr/local/bin/dockstop
dockstart

Or, you can run the container from docker hub

# Run from docker hub
docker run -it --rm \
    -v $HOME/.kube:/root/.kube \
    -v $HOME/.ssh:/root/.ssh \
    -v $HOME/.aws:/root/.aws \
    -v $HOME/src:/root/src \
    --name docker-dev-env \
    mathewfleisch/docker-dev-env:latest

---------------------------------------------------------------------

# Build container
git clone git@github.com:mathew-fleisch/docker-dev-env.git
cd docker-dev-env
docker build -t docker-dev-env .

# Run (local) container
docker run -it --rm \
    -v $HOME/.kube:/root/.kube \
    -v $HOME/.ssh:/root/.ssh \
    -v $HOME/.aws:/root/.aws \
    -v $HOME/src:/root/src \
    --name docker-dev-env \
    docker-dev-env:latest

Installed Tools

Built on top of ubuntu:20.04 the apt repository is updated and upgraded before installation of additional tools. See Dockerfile and .tool-versions to see the tools that are installed in this container.

Automation

There are two github-action jobs set up to build, push and update the container and dependencies baked into the container. These jobs are configured to run on self-hosted runners and will use the docker plugin, buildx, to build multi-arch containers.

Release on git tags (build-container.yaml)

The main branch is used to git tag stable versions and trigger a build+push to docker hub.

git tag v1.0.0
git push origin v1.0.0

On new major/minor versions of of this tag, the apt dependencies will be upgraded, and on patches, asdf dependencies will be upgraded.

Automatic dependency updates (update-asdf-versions.yaml)

This github action is triggered via cron will use asdf to update the versions in .tool-versions, ignoring those tools pinned in pin, and trigger a new git tag patch, if .tool-versions changes (the tag triggers the build-container.yaml action).

About

A container definition that will act as a local development environment

Resources

License

Stars

Watchers

Forks

Packages

No packages published