-
Change your console path into the root folder of your project
-
Copy the necessary files
NOTES: You can switch from Option 1 to Option 2 for any hook individually at any time.
In case you wanna be safe and secure use Option 2 (Have a look why Option 0 is not recommended).
No already present file will get overwritten.-
Option 0 - Quickstart (Technically a shorter Option 1 but piping from the internet directly to bash is not recommended)
curl -sSL https://raw.githubusercontent.com/ichbestimmtnicht/docker-autobuild-release/master/template/initialize.sh | bash
-
Option 1 - Hooks get downloaded from this repository @ buildtime.
curl -sSL https://raw.githubusercontent.com/ichbestimmtnicht/docker-autobuild-release/master/template/initialize.sh > initialize.sh bash initialize.sh rm initialize.sh
-
Option 2 - Using the code locally
curl -sSL https://raw.githubusercontent.com/ichbestimmtnicht/docker-autobuild-release/master/template/initialize.sh > initialize.sh bash initialize.sh -local rm initialize.sh
-
-
use
bash initialize.sh -tag=master
to always get the bleeding edge version downloaded at buildtime. Use with caution: BREAKING CHANGES MAY HAPPEN! -
hooks/env.sh
is where your variables are set. Change the file to your liking (It is well documented)
Please do not forget to set ssh-keys and similiar values only within your dockerhub env and only reference them likeBUILD_ARG_SSH_KEY="${SSH_KEY}"
within thehooks/env.sh
file! -
Have a look at the different Dockerfile templates (within the hooks folder) and copy/paste/adapt the content of your Dockerfile into them.
PLANNED Or you could use a combined Dockerfile -
If you already had a dockerfile in your project root, it wasn’t overwritten. This is the file that will be displayed at the hub.docker.com website.
Example from this repo
I recommend to add a header like this in case you don't use a combined Dockerfile:# Dummy Dockerfile because hooks aren't working with a custom Filename # Have a look into the hooks folder to see them per arch # https://github.com/ichbestimmtnicht/docker-autobuild-release/tree/master/hooks/ FROM scratch as buildcontext COPY . . # Your instructions FROM alpine
-
Setup Dockerhub autobuild
-
Let the images build and test them
-
None-amd64 images are not properly tagged -> only within the manifest
-
No Experimental Features (like
--platform
to tag those none amd64 images correct from the start) -
if the build process for an arch doesn't finish the last working build will get referenced (See To do point 3)
- coding the option to use a single dockerfile for all arches
- adding moore arches
- adding option to let the build fail if one of the images is not building correctly (the base tag will get updated and references to the last working image in this case)
- enable experimental docker build features for hub.docker.com
- CI/CD integrations: jenkins; circleci; gitlab
- Test the ability to build windows containers
- Combine filedownloads in
hooks/initialize.sh
into a single loop with the help of an array
Create an issue with your suggestions
Active development is in a private gitlab repository so do not open Pull Requests to this repository itself. Contact me (e.g. with an issue) to get access.
docker-autobuild by Ludwig Werner Döhnert is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://gitlab.com/ichbestimmtnicht/docker-autobuild