Add docs dockerfile
This commit is contained in:
parent
9fbf73ad1b
commit
460259dda6
20
docker/Dockerfile.docs
Normal file
20
docker/Dockerfile.docs
Normal file
|
@ -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
|
7
docker/docker-compose.yml
Normal file
7
docker/docker-compose.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
actix-fs-docs:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile.docs
|
Loading…
Reference in a new issue