Something similar to Development Containers build with docker-compose and a few simple bash scripts.
Requires docker, docker-compose and some basic tools like git, bash and ssh.
The commands bin/dev
should be somewhere in your PATH.
- Assuming a project called
allkinds
in~/projects/allkinds
- Clone this repo into the project root
dev allkinds init
- Modify the
Dockerfile
to include the services and tools you need - Build the docker container using the command
dev build
- Start the docker container with
dev start
- Connect to the container with
dev
and start development - Enable port forwarding to the host
dev ports 3000 8080:80
, in this case port 3000 and 8080 of the host will be forwarded to port 3000 and 80 of the container
- Less dependencies: Only docker, docker-compose, git, bash and ssh
- Easier to understand what is going on:
- Main script is
bin/dev
: ~160 lines of bash, mostly if/else and case statements, no loops - Port forwarding in
bin/ports
: ~30 lines of bash, starting a ssh tunnel withssh -L ...
- Docker-compose file: ~20 lines of yaml, defining services and volumes
- Dockerfile: ~10 lines, defining the base image and define which tools to install by default
- Setup scripts called from Dockerfile or run manually in
setup/
: ~5-30 lines of bash each
- Main script is
You are supsed to modify the Dockerfile and setup scripts to fit your needs.
All code is licensed under the LetMeKnow license.
This software is provided "as is", without any warranty. You are free to use, modify and distribute it under the following terms:
- create an issue in this repository
- or post on X and tag @f0i.
After you have done that, you are free to use the code in any way you like. You can even remove the license notice if you want to.