Docker support

Josh Reichardt
2016-10-06 10:15:52 -07:00
parent 44b6f5e176
commit a8aba4df34

36
Docker-support.md Normal file

@@ -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
```