This is a development environment for Docker images built using Dojo.
This image enables you to build,lint and test your Docker images.
This image has installed:
- bats
- checkmake
- dive
- docker
20.10.3
- dojo
0.10.3
- hadolint
1.22.1
- shellcheck
0.7.1
- Install Docker, if you do not have it already.
- Install Dojo, it is a self-containted binary, so just place it somewhere on the
PATH
. On OSX you can usebrew install kudulab/homebrew-dojo-osx/dojo
.
On Linux
DOJO_VERSION=0.10.2
wget -O dojo https://github.com/kudulab/dojo/releases/download/${DOJO_VERSION}/dojo_linux_amd64
sudo mv dojo /usr/local/bin
sudo chmod +x /usr/local/bin/dojo
- Checkout and
cd
into a project with a Docker image, then start the Dojo container
git clone https://github.com/catosplace/docker-docker-image-dojo
cd docker-docker-image-dojo
dojo
This will enter the Dojo Docker container with all the tools needed to build, lint and test your Docker image. Your local code is available in the current directory /dojo/work
.
This Dojo image provides the following tools for use when building Docker images
$ hadolint Dockerfile
$ shellcheck test.sh
Dependencies
- Docker
- Dojo
export DOCKER_BUILDKIT=1
docker build \
--build-arg ALPINE_VERSION=<ALPINE_VERSION> \
-t catosplace/docker-docker-image-dojo .
make
Pre-Commit
pre-commit install
pre-commit install --hook-type commit-msg
pre-commit run --all-files
MIT License
Copyright (c) 2020 Catosplace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Update Development Documentation
- Add License
- Fix up the Structure of the Project
- Add MicroBadger / ImageLayers.io
- Decide on CI/CD - Circle CI?
- Add ADRS?
Tools
- dive
- skopeo (inspection)
- conftest (docker-security-check)