Skip to content
README.md 1.11 KiB
Newer Older
Dom Sekotill's avatar
Dom Sekotill committed
docker-init.sh
==============

docker-init.sh is a file of shell helper functions for writing entrypoint
scripts for docker images.


Install
-------

Dom Sekotill's avatar
Dom Sekotill committed
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 <TARGET-PATH>
```

To use [`docker-entrypoint.sh`][2], `docker-init.sh` must go in `/lib/`:
Dom Sekotill's avatar
Dom Sekotill committed

```
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
Dom Sekotill's avatar
Dom Sekotill committed
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.

Dom Sekotill's avatar
Dom Sekotill committed
[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"