Depend on Docker (DoD) is an open source project that makes any software easy to build, ship, and run! It removes complexity by containerizing your executables and all of their dependencies.
If you haven't done so already, please install Docker
This project works on both Linux and Windows. It strives to drastically simplify your development process and make it easy to build Docker containers by providing an intuitive project template. To create a project, you can execute the corresponding script, or just run the command line relevant to your operating system below.
create.sh [new_project_path]
or
docker container run --rm -it -v $(pwd):/wd bhgedigital/svn sh -c "svn checkout https://github.com/bhgedigital/depend-on-docker/trunk/linux/ /wd && rm -rf /wd/.svn"
or
curl -L http://bit.ly/dodocker | bash -s -- $(pwd)
$(pwd) may be replaced with the desired path where you would like your new depend-on-docker project created
create.bat [new_project_path]
or
docker container run --rm -it -v "%cd%":"c:\wd" bhgedigital/win-svn cmd /C "cd c:\wd && svn checkout https://github.com/bhgedigital/depend-on-docker/trunk/windows/"
or
curl -L http://bit.ly/dodockerw > create.bat
create.bat "%cd%"
Your depend-on-docker project is created with default settings that work out of the box and creates a Docker image called "myapp". There are several settings that you can customize to make this project fit your needs.
Linux: .env ; Windows: env.cmd
The environment file contains all build-time and run-time settings for your project. Edit this file to change the name and version tag of your Docker container image, the registry where this image would be stored, the volume mount and port mapping settings for your Docker container, etc.
Linux: Container-Root -> / ; Windows: Container-Root -> C:\
Any artifact placed in the Container-Root folder of this project is copied into the container image. Directory Container-Root is copied to the root path within the container image and subdirectories are included, preserving the subdirectory structure. For example, any items placed in Container-Root/opt/myapp will appear under /opt/myapp within the container.
Linux: Container-Root/setup.sh, Windows: Container-Root\setup.bat
The setup script file is copied into the root of the container image and executed at build time. Rather than customizing the Dockerfile, the setup script file is a good location for placing all of the project-specific commands you would like to execute when setting up the software in your container image. The Dockerfile can be modified to further customize your project, however that is not required.
Linux: Container-Root/startup.sh, Windows: Container-Root\startup.bat
The startup script file is available in the root of the container image and is executed at container startup time. Place the command to start your application in this file.
For ease of use, all Docker commands required to use this project have been embedded into intuitively named native shell scripts.
Linux: ./build.sh ; Windows: build.bat
Builds the Docker container image and tags it using the registry and version tag settingsspecified in your environment file
Linux: ./push.sh or ./pull.sh ; Windows: push.bat or pull.bat
Pushes or pulls the Docker container image to of from the registry specified in your environment file
Linux: ./run.sh [command] ; Windows: run.bat [command]
Creates a docker container and, if no argument is specified, executes the startup script. If a command line is specified as an argument to the run script, this command line is executed in the container in place of the default startup script.
Linux: ./logs.sh ; Windows: logs.bat
Tails the output of the command executed inside the container. Use Ctrl-C to stop the tail.
Linux: ./exec.sh [command] ; Windows: exec.bat [command]
This script requires a running container to exist. It executes the specified command in the running container. If no command is specified as an argument, then a default command is executed to open a new interactive shell within the container.
Linux: ./status.sh ; Windows: status.bat
This script shows the current status of the Docker container including any mapped ports.
Linux: ./stop.sh ; Windows: stop.bat
Stops the container and cleans up its files.
Depend on Docker is an easy to use project template that helps start working quickly on any of your projects. It lets you embed the knowledge you have about your software into a container that hides away complexities and makes it easy to build, ship, and run on Linux or Windows, locally, in a data center, and on any cloud. To accomplish all of it, the only dependency you need is Docker!
DockerCon 2018 Video: http://bit.ly/dodockercon
DockerCon 2018 Slides: http://bit.ly/dodslides
Ref # | Project Name | Description | Link |
---|---|---|---|
1 | semtk |
Drag and drop SPARQL queries and data ingestion for Virtuoso | https://github.com/ge-semtk/semtk |
2 | tree |
You do not need to install the Linux tree command, just run it | https://github.com/iankoulski/tree |
3 | envsubst |
Run the envsubst command in a Linux container | https://github.com/bhgedigital/envsubst |
4 | enigma |
Encrypt and decrypt content using the enigma container | https://github.com/bhgedigital/enigma |