mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
docker: Update dockerfiles to build the lldap_set_password tool
This commit is contained in:
parent
b4d7ada317
commit
bf64c091cc
7
.github/workflows/Dockerfile.ci.alpine
vendored
7
.github/workflows/Dockerfile.ci.alpine
vendored
@ -12,8 +12,10 @@ RUN mkdir -p /lldap/app
|
|||||||
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
||||||
mv bin/x86_64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
mv bin/x86_64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
||||||
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
||||||
|
mv bin/x86_64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password target/lldap_set_password && \
|
||||||
chmod +x target/lldap && \
|
chmod +x target/lldap && \
|
||||||
chmod +x target/migration-tool && \
|
chmod +x target/migration-tool && \
|
||||||
|
chmod +x target/lldap_set_password && \
|
||||||
ls -la target/ . && \
|
ls -la target/ . && \
|
||||||
pwd \
|
pwd \
|
||||||
; fi
|
; fi
|
||||||
@ -21,8 +23,10 @@ RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
|||||||
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
||||||
mv bin/aarch64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
mv bin/aarch64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
||||||
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
||||||
|
mv bin/aarch64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password target/lldap_set_password && \
|
||||||
chmod +x target/lldap && \
|
chmod +x target/lldap && \
|
||||||
chmod +x target/migration-tool && \
|
chmod +x target/migration-tool && \
|
||||||
|
chmod +x target/lldap_set_password && \
|
||||||
ls -la target/ . && \
|
ls -la target/ . && \
|
||||||
pwd \
|
pwd \
|
||||||
; fi
|
; fi
|
||||||
@ -30,8 +34,10 @@ RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
|||||||
RUN if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
|
RUN if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
|
||||||
mv bin/armv7-unknown-linux-gnueabihf-lldap-bin/lldap target/lldap && \
|
mv bin/armv7-unknown-linux-gnueabihf-lldap-bin/lldap target/lldap && \
|
||||||
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool target/migration-tool && \
|
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool target/migration-tool && \
|
||||||
|
mv bin/armv7-unknown-linux-gnueabihf-lldap_set_password-bin/lldap_set_password target/lldap_set_password && \
|
||||||
chmod +x target/lldap && \
|
chmod +x target/lldap && \
|
||||||
chmod +x target/migration-tool && \
|
chmod +x target/migration-tool && \
|
||||||
|
chmod +x target/lldap_set_password && \
|
||||||
ls -la target/ . && \
|
ls -la target/ . && \
|
||||||
pwd \
|
pwd \
|
||||||
; fi
|
; fi
|
||||||
@ -42,6 +48,7 @@ COPY lldap_config.docker_template.toml /lldap/
|
|||||||
COPY web/index_local.html web/index.html
|
COPY web/index_local.html web/index.html
|
||||||
RUN cp target/lldap /lldap/ && \
|
RUN cp target/lldap /lldap/ && \
|
||||||
cp target/migration-tool /lldap/ && \
|
cp target/migration-tool /lldap/ && \
|
||||||
|
cp target/lldap_set_password /lldap/ && \
|
||||||
cp -R web/index.html \
|
cp -R web/index.html \
|
||||||
web/pkg \
|
web/pkg \
|
||||||
web/static \
|
web/static \
|
||||||
|
7
.github/workflows/Dockerfile.ci.debian
vendored
7
.github/workflows/Dockerfile.ci.debian
vendored
@ -12,8 +12,10 @@ RUN mkdir -p /lldap/app
|
|||||||
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
||||||
mv bin/x86_64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
mv bin/x86_64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
||||||
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
||||||
|
mv bin/x86_64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password target/lldap_set_password && \
|
||||||
chmod +x target/lldap && \
|
chmod +x target/lldap && \
|
||||||
chmod +x target/migration-tool && \
|
chmod +x target/migration-tool && \
|
||||||
|
chmod +x target/lldap_set_password && \
|
||||||
ls -la target/ . && \
|
ls -la target/ . && \
|
||||||
pwd \
|
pwd \
|
||||||
; fi
|
; fi
|
||||||
@ -21,8 +23,10 @@ RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
|
|||||||
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
||||||
mv bin/aarch64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
mv bin/aarch64-unknown-linux-musl-lldap-bin/lldap target/lldap && \
|
||||||
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool target/migration-tool && \
|
||||||
|
mv bin/aarch64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password target/lldap_set_password && \
|
||||||
chmod +x target/lldap && \
|
chmod +x target/lldap && \
|
||||||
chmod +x target/migration-tool && \
|
chmod +x target/migration-tool && \
|
||||||
|
chmod +x target/lldap_set_password && \
|
||||||
ls -la target/ . && \
|
ls -la target/ . && \
|
||||||
pwd \
|
pwd \
|
||||||
; fi
|
; fi
|
||||||
@ -30,8 +34,10 @@ RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
|
|||||||
RUN if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
|
RUN if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
|
||||||
mv bin/armv7-unknown-linux-gnueabihf-lldap-bin/lldap target/lldap && \
|
mv bin/armv7-unknown-linux-gnueabihf-lldap-bin/lldap target/lldap && \
|
||||||
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool target/migration-tool && \
|
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool target/migration-tool && \
|
||||||
|
mv bin/armv7-unknown-linux-gnueabihf-lldap_set_password-bin/lldap_set_password target/lldap_set_password && \
|
||||||
chmod +x target/lldap && \
|
chmod +x target/lldap && \
|
||||||
chmod +x target/migration-tool && \
|
chmod +x target/migration-tool && \
|
||||||
|
chmod +x target/lldap_set_password && \
|
||||||
ls -la target/ . && \
|
ls -la target/ . && \
|
||||||
pwd \
|
pwd \
|
||||||
; fi
|
; fi
|
||||||
@ -42,6 +48,7 @@ COPY lldap_config.docker_template.toml /lldap/
|
|||||||
COPY web/index_local.html web/index.html
|
COPY web/index_local.html web/index.html
|
||||||
RUN cp target/lldap /lldap/ && \
|
RUN cp target/lldap /lldap/ && \
|
||||||
cp target/migration-tool /lldap/ && \
|
cp target/migration-tool /lldap/ && \
|
||||||
|
cp target/lldap_set_password /lldap/ && \
|
||||||
cp -R web/index.html \
|
cp -R web/index.html \
|
||||||
web/pkg \
|
web/pkg \
|
||||||
web/static \
|
web/static \
|
||||||
|
16
.github/workflows/docker-build-static.yml
vendored
16
.github/workflows/docker-build-static.yml
vendored
@ -125,8 +125,8 @@ jobs:
|
|||||||
key: lldap-bin-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
key: lldap-bin-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
lldap-bin-${{ matrix.target }}-
|
lldap-bin-${{ matrix.target }}-
|
||||||
- name: Compile ${{ matrix.target }} lldap and migration tool
|
- name: Compile ${{ matrix.target }} lldap and tools
|
||||||
run: cargo build --target=${{ matrix.target }} --release -p lldap -p migration-tool
|
run: cargo build --target=${{ matrix.target }} --release -p lldap -p migration-tool -p lldap_set_password
|
||||||
- name: Check path
|
- name: Check path
|
||||||
run: ls -al target/release
|
run: ls -al target/release
|
||||||
- name: Upload ${{ matrix.target}} lldap artifacts
|
- name: Upload ${{ matrix.target}} lldap artifacts
|
||||||
@ -139,6 +139,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ matrix.target }}-migration-tool-bin
|
name: ${{ matrix.target }}-migration-tool-bin
|
||||||
path: target/${{ matrix.target }}/release/migration-tool
|
path: target/${{ matrix.target }}/release/migration-tool
|
||||||
|
- name: Upload ${{ matrix.target }} password tool artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.target }}-lldap_set_password-bin
|
||||||
|
path: target/${{ matrix.target }}/release/lldap_set_password
|
||||||
|
|
||||||
lldap-database-integration-test:
|
lldap-database-integration-test:
|
||||||
needs: [build-ui,build-bin]
|
needs: [build-ui,build-bin]
|
||||||
@ -347,8 +352,12 @@ jobs:
|
|||||||
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool bin/aarch64-migration-tool
|
mv bin/aarch64-unknown-linux-musl-migration-tool-bin/migration-tool bin/aarch64-migration-tool
|
||||||
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool bin/amd64-migration-tool
|
mv bin/x86_64-unknown-linux-musl-migration-tool-bin/migration-tool bin/amd64-migration-tool
|
||||||
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool bin/armhf-migration-tool
|
mv bin/armv7-unknown-linux-gnueabihf-migration-tool-bin/migration-tool bin/armhf-migration-tool
|
||||||
|
mv bin/aarch64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password bin/aarch64-lldap_set_password
|
||||||
|
mv bin/x86_64-unknown-linux-musl-lldap_set_password-bin/lldap_set_password bin/amd64-lldap_set_password
|
||||||
|
mv bin/armv7-unknown-linux-gnueabihf-lldap_set_password-bin/lldap_set_password bin/armhf-lldap_set_password
|
||||||
chmod +x bin/*-lldap
|
chmod +x bin/*-lldap
|
||||||
chmod +x bin/*-migration-tool
|
chmod +x bin/*-migration-tool
|
||||||
|
chmod +x bin/*-lldap_set_password
|
||||||
|
|
||||||
- name: Download llap ui artifacts
|
- name: Download llap ui artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
@ -376,6 +385,9 @@ jobs:
|
|||||||
mv bin/aarch64-migration-tool aarch64-lldap/migration-tool
|
mv bin/aarch64-migration-tool aarch64-lldap/migration-tool
|
||||||
mv bin/amd64-migration-tool amd64-lldap/migration-tool
|
mv bin/amd64-migration-tool amd64-lldap/migration-tool
|
||||||
mv bin/armhf-migration-tool armhf-lldap/migration-tool
|
mv bin/armhf-migration-tool armhf-lldap/migration-tool
|
||||||
|
mv bin/aarch64-lldap_set_password aarch64-lldap/lldap_set_password
|
||||||
|
mv bin/amd64-lldap_set_password amd64-lldap/lldap_set_password
|
||||||
|
mv bin/armhf-lldap_set_password armhf-lldap/lldap_set_password
|
||||||
cp -r app aarch64-lldap/
|
cp -r app aarch64-lldap/
|
||||||
cp -r app amd64-lldap/
|
cp -r app amd64-lldap/
|
||||||
cp -r app armhf-lldap/
|
cp -r app armhf-lldap/
|
||||||
|
@ -31,11 +31,12 @@ FROM chef AS builder
|
|||||||
COPY --from=planner /tmp/recipe.json recipe.json
|
COPY --from=planner /tmp/recipe.json recipe.json
|
||||||
RUN cargo chef cook --release -p lldap_app --target wasm32-unknown-unknown \
|
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
|
&& cargo chef cook --release -p migration-tool \
|
||||||
|
&& cargo chef cook --release -p lldap_set_password
|
||||||
|
|
||||||
# Copy the source and build the app and server.
|
# Copy the source and build the app and server.
|
||||||
COPY --chown=app:app . .
|
COPY --chown=app:app . .
|
||||||
RUN cargo build --release -p lldap -p migration-tool \
|
RUN cargo build --release -p lldap -p migration-tool -p lldap_set_password \
|
||||||
# Build the frontend.
|
# Build the frontend.
|
||||||
&& ./app/build.sh
|
&& ./app/build.sh
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ WORKDIR /app
|
|||||||
COPY --from=builder /app/app/index_local.html app/index.html
|
COPY --from=builder /app/app/index_local.html app/index.html
|
||||||
COPY --from=builder /app/app/static app/static
|
COPY --from=builder /app/app/static app/static
|
||||||
COPY --from=builder /app/app/pkg app/pkg
|
COPY --from=builder /app/app/pkg app/pkg
|
||||||
COPY --from=builder /app/target/release/lldap /app/target/release/migration-tool ./
|
COPY --from=builder /app/target/release/lldap /app/target/release/migration-tool /app/target/release/lldap_set_password ./
|
||||||
COPY docker-entrypoint.sh lldap_config.docker_template.toml ./
|
COPY docker-entrypoint.sh lldap_config.docker_template.toml ./
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
Loading…
Reference in New Issue
Block a user