Add Dockerfile
This commit is contained in:
parent
a843b20f7a
commit
7e1ba11c4d
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
FROM rust:1.59.0-slim-bullseye as build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y libssl-dev pkg-config
|
||||
|
||||
COPY ./src ./src
|
||||
COPY ./Cargo.toml ./
|
||||
COPY ./Cargo.lock ./
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
#################
|
||||
# RELEASE IMAGE #
|
||||
#################
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/target/release/le-easy-certs /app/
|
||||
|
||||
ENV LE_CONF=/le-conf/le-conf.toml
|
||||
|
||||
CMD ["./le-easy-certs"]
|
||||
@ -40,3 +40,11 @@ domains = [
|
||||
"www.example2.com",
|
||||
]
|
||||
```
|
||||
|
||||
## Docker
|
||||
The docker image is not yet fully usage. The intention is to have a `le-easy-certs` container
|
||||
running next to a a `haproxy` container and automatically renew / update the certificates when
|
||||
needed. Also the certificates could be hot reloaded in `haproxy` at some point.
|
||||
|
||||
Right now the docker image could be used to run `le-easy-certs` manually / automated at fixed times
|
||||
controlled by the host.
|
||||
Loading…
x
Reference in New Issue
Block a user