mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-26 19:11:06 +01:00
Docker support
36
Docker-support.md
Normal file
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
|
||||
```
|
||||
Reference in New Issue
Block a user