Scripts to easily manage Docker containers used as a development environment. The Makefile approach is to build a reusable container, as opposed to removing on exit. This allows the installed dependancies to be installed once and kept in the container without exposing them in the mounted volume (which is slow). The container can easily be removed and rebuilt easily, but without remembering all of the settings and flags.
Makefile
- Used by themake
command, this file defines commands for managing a container dev environment. It's essentially an easy wrapper around the existingdocker
capabilities. Copy this file to a project directory.make
- runscreate
, theninstall
, thenstart
. If the container exists, then just runsstart
.make create
- creates a new container from the Gitpod image, named based on the current working directory.make install
- if a known package manager file is found, run the install command. Recognizespipenv
,bundler
, ornpm
.make start
- start the existing container.make run
- start a temporary container based on the same parameters asmake create
.make clean
- removes the existing container.
docker-dev
- abash
script for starting a container. Similar to the Makefile, but with less awareness of existing containers. Copy this somewhere in your$PATH