diff --git a/Docker-support.md b/Docker-support.md new file mode 100644 index 0000000..8863d33 --- /dev/null +++ b/Docker-support.md @@ -0,0 +1,36 @@ +If you are interested in wrapping the dehyrdated script in a Docker container, you can use the following Dockerfile as a reference. + +``` +FROM alpine:latest + +RUN apk add --update \ + bash \ + curl \ + openssl \ + && rm -rf /var/cache/apk/* + +WORKDIR dehydrated +COPY . . + +ENTRYPOINT ["bash", "dehydrated"] +``` + +This builds a minimal Docker image (around 33mb) with all of the dependencies that dehyrdated needs to run and executes the script as an entrypoint. + +To build this, make sure you are in the root directory of the dehydrated project, then run the following command: + +``` +docker build -t dehydrated . +``` + +To run this, try the following command: + +``` +docker run -it --rm dehydrated +``` + +It should print out the default help message. If you want to write the certs onto the host use a volume mount, like this: + +``` +docker run -it --rm -v $(pwd):/dehydrated dehydrated +``` \ No newline at end of file