From a8aba4df34479345b07900b897217ec36f112017 Mon Sep 17 00:00:00 2001 From: Josh Reichardt Date: Thu, 6 Oct 2016 10:15:52 -0700 Subject: [PATCH] Docker support --- Docker-support.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Docker-support.md 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