mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
fixing
This commit is contained in:
parent
aaeaa37bbf
commit
b6317c6dd2
37
Dockerfile
37
Dockerfile
@ -8,10 +8,6 @@ ENV OPENSSL_INCLUDE_DIR="/usr/include/openssl/"
|
|||||||
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER="arm-linux-gnueabihf-gcc"
|
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER="arm-linux-gnueabihf-gcc"
|
||||||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc"
|
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc"
|
||||||
|
|
||||||
### Only enable if building non-native architecture
|
|
||||||
#ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf/"
|
|
||||||
#ENV OPENSSL_LIB_DIR="/usr/lib/aarch64-linux-gnu/"
|
|
||||||
|
|
||||||
# Get develop package and npm
|
# Get develop package and npm
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt install -y --no-install-recommends curl git wget libssl-dev build-essential make perl pkg-config && \
|
apt install -y --no-install-recommends curl git wget libssl-dev build-essential make perl pkg-config && \
|
||||||
@ -24,11 +20,16 @@ RUN apt update && \
|
|||||||
npm install -g yarn && \
|
npm install -g yarn && \
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
|
|
||||||
# Install cargo wasm-pack
|
# Install wasm-pack and rollup
|
||||||
RUN cargo install wasm-pack && \
|
RUN npm install -g wasm-pack && \
|
||||||
npm install -g rollup
|
npm install -g rollup
|
||||||
|
|
||||||
### aarch64 build
|
#######################################################
|
||||||
|
### Only enable if building non-native architecture ###
|
||||||
|
#######################################################
|
||||||
|
## aarch64 build
|
||||||
|
### Set openssl path
|
||||||
|
#ENV OPENSSL_LIB_DIR="/usr/lib/aarch64-linux-gnu/"
|
||||||
#RUN dpkg --add-architecture arm64 && \
|
#RUN dpkg --add-architecture arm64 && \
|
||||||
# apt update && \
|
# apt update && \
|
||||||
# apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross libssl-dev:arm64 && \
|
# apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross libssl-dev:arm64 && \
|
||||||
@ -37,8 +38,10 @@ RUN cargo install wasm-pack && \
|
|||||||
### add arm64 target
|
### add arm64 target
|
||||||
#RUN rustup target add aarch64-unknown-linux-gnu
|
#RUN rustup target add aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
### armhf build
|
## armhf build
|
||||||
#RUN dpkg --add-architecture arm64 && \
|
### Set openssl path
|
||||||
|
#ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf/"
|
||||||
|
#RUN dpkg --add-architecture armhf && \
|
||||||
# apt update && \
|
# apt update && \
|
||||||
# apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross libssl-dev:armhf && \
|
# apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross libssl-dev:armhf && \
|
||||||
# apt clean && \
|
# apt clean && \
|
||||||
@ -51,6 +54,10 @@ WORKDIR /lldap-src
|
|||||||
# Compiling application, take your time
|
# Compiling application, take your time
|
||||||
### amd64
|
### amd64
|
||||||
RUN cargo build --target=x86_64-unknown-linux-gnu --release -p lldap -p migration-tool
|
RUN cargo build --target=x86_64-unknown-linux-gnu --release -p lldap -p migration-tool
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
### Only enable if building non-native architecture ###
|
||||||
|
#######################################################
|
||||||
### arm64
|
### arm64
|
||||||
#RUN cargo build --target=aarch64-unknown-linux-gnu --release -p lldap -p migration-tool
|
#RUN cargo build --target=aarch64-unknown-linux-gnu --release -p lldap -p migration-tool
|
||||||
### armhf
|
### armhf
|
||||||
@ -66,9 +73,9 @@ COPY lldap_config.docker_template.toml /lldap/
|
|||||||
# The applications
|
# The applications
|
||||||
RUN cp target/*/release/lldap /lldap/lldap && \
|
RUN cp target/*/release/lldap /lldap/lldap && \
|
||||||
cp target/*/release/migration-tool /lldap/migration-tool && \
|
cp target/*/release/migration-tool /lldap/migration-tool && \
|
||||||
cp -R web/index.html \
|
cp -R app/index.html \
|
||||||
web/pkg \
|
app/pkg \
|
||||||
web/static \
|
app/static \
|
||||||
/lldap/app/
|
/lldap/app/
|
||||||
# Just checking
|
# Just checking
|
||||||
RUN ls -al /lldap && \
|
RUN ls -al /lldap && \
|
||||||
@ -88,7 +95,7 @@ WORKDIR /app
|
|||||||
ENV UID=1000
|
ENV UID=1000
|
||||||
ENV GID=1000
|
ENV GID=1000
|
||||||
ENV USER=lldap
|
ENV USER=lldap
|
||||||
RUN echo http://mirror.math.princeton.edu/pub/alpinelinux/edge/testing/ >> /etc/apk/repositories && \
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
|
||||||
apk add --no-cache tini ca-certificates bash gosu && \
|
apk add --no-cache tini ca-certificates bash gosu && \
|
||||||
addgroup -g $GID $USER && \
|
addgroup -g $GID $USER && \
|
||||||
adduser \
|
adduser \
|
||||||
@ -102,8 +109,8 @@ RUN echo http://mirror.math.princeton.edu/pub/alpinelinux/edge/testing/ >> /etc/
|
|||||||
mkdir -p /data && \
|
mkdir -p /data && \
|
||||||
chown $USER:$USER /data
|
chown $USER:$USER /data
|
||||||
### Copy out the binary and web from builder
|
### Copy out the binary and web from builder
|
||||||
COPY --from=builder --chown=$CONTAINERUSER:$CONTAINERUSER /lldap /app
|
COPY --from=builder --chown=$USER:$USER /lldap /app
|
||||||
COPY --from=builder --chown=$CONTAINERUSER:$CONTAINERUSER /docker-entrypoint.sh /docker-entrypoint.sh
|
COPY --from=builder --chown=$USER:$USER /docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
|
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user