docker: add migration-tool to the image

This commit is contained in:
Valentin Tolmer 2021-12-08 10:20:18 +01:00 committed by nitnelave
parent 31cf9b8e2c
commit ef0a0ffced
2 changed files with 5 additions and 6 deletions

View File

@ -5,9 +5,6 @@
# Don't track cargo generated files
target/*
server/target/*
app/target/*
auth/target/*
# Don't track the generated JS
app/pkg/*
@ -20,6 +17,7 @@ Dockerfile
README.md
LICENSE
docs/*
example_configs/*
# Various config files that shouldn't be tracked
lldap_config.toml

View File

@ -31,11 +31,12 @@ RUN cargo chef prepare --recipe-path /tmp/recipe.json
FROM chef AS builder
COPY --from=planner /tmp/recipe.json recipe.json
RUN cargo chef cook --release -p lldap_app --target wasm32-unknown-unknown \
&& cargo chef cook --release -p lldap
&& cargo chef cook --release -p lldap \
&& cargo chef cook --release -p migration-tool
# Copy the source and build the app and server.
COPY --chown=app:app . .
RUN cargo build --release -p lldap \
RUN cargo build --release -p lldap -p migration-tool \
# Build the frontend.
&& ./app/build.sh
@ -47,7 +48,7 @@ WORKDIR /app
COPY --from=builder /app/app/index_local.html app/index.html
COPY --from=builder /app/app/static app/static
COPY --from=builder /app/app/pkg app/pkg
COPY --from=builder /app/target/release/lldap lldap
COPY --from=builder /app/target/release/lldap /app/target/release/migration-tool ./
COPY docker-entrypoint.sh lldap_config.docker_template.toml ./
RUN set -x \