diff --git a/docker/Dockerfile.docs b/docker/Dockerfile.docs new file mode 100644 index 0000000..7c53d67 --- /dev/null +++ b/docker/Dockerfile.docs @@ -0,0 +1,20 @@ +FROM rust:latest as builder + +RUN adduser --disabled-password --gecos '' build \ + && mkdir /src \ + && chown build:build /src + +USER build + +ENV USER=build + +WORKDIR /src + +COPY --chown=build:build Cargo.toml Cargo.lock ./ +COPY --chown=build:build ./src ./src + +RUN cargo doc --no-deps + +FROM arm64v8/nginx:mainline-alpine + +COPY --from=builder --chown=nginx:nginx /src/target/doc /usr/share/nginx/html diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..028d4ad --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3' + +services: + actix-fs-docs: + build: + context: .. + dockerfile: docker/Dockerfile.docs