docker-init.sh ============== docker-init.sh is a file of shell helper functions for writing entrypoint scripts for docker images. Install ------- Just ADD the file [`docker-init.sh`][1] to your docker images like so: ``` ADD https://code.kodo.org.uk/kodo.org.uk/docker-init/raw/master/docker-init.sh ``` Entrypoint ---------- To use [`docker-entrypoint.sh`][2], `docker-init.sh` must go in `/lib/`: ``` ADD https://code.kodo.org.uk/kodo.org.uk/docker-init/raw/master/docker-init.sh /lib/docker-init.sh ADD https://code.kodo.org.uk/kodo.org.uk/docker-init/raw/master/docker-entrypoint.sh /bin/entrypoint RUN chmod +x /bin/entrypoint ENTRYPOINT ["/bin/entrypoint"] ``` Any sourceable environment variable setup scripts go into `/etc/environment.d` while other setup scripts go into `/etc/init.d`. They will be sourced & run respectively before the container command is run. [1]: https://code.kodo.org.uk/kodo.org.uk/docker-init/blob/master/doc/docker-init.md "docker-init.sh documentation" [2]: https://code.kodo.org.uk/kodo.org.uk/docker-init/blob/master/doc/docker-entrypoint.md "docker-entrypoint documentation"