mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +00:00
Hopefully last dockerfile changes for magick, rexiv2
This commit is contained in:
parent
64ee1ac8ad
commit
80d9387dbb
4 changed files with 14 additions and 29 deletions
|
@ -1,17 +1,14 @@
|
|||
FROM rustembedded/cross:x86_64-unknown-linux-gnu AS x86_64-builder
|
||||
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
addgroup --gid "${GID}" build && \
|
||||
addgroup --gid 991 build && \
|
||||
adduser \
|
||||
--disabled-password \
|
||||
--gecos "" \
|
||||
--ingroup build \
|
||||
--uid "${UID}" \
|
||||
--uid 991 \
|
||||
--home /opt/build \
|
||||
build
|
||||
|
||||
|
@ -130,7 +127,7 @@ ENV \
|
|||
RUN \
|
||||
mkdir -p ./src && \
|
||||
echo 'fn main() { println!("Dummy") }' > ./src/main.rs && \
|
||||
cargo build && \
|
||||
cargo build --release && \
|
||||
rm -rf ./src
|
||||
|
||||
COPY src ./src/
|
||||
|
@ -138,11 +135,11 @@ COPY src ./src/
|
|||
USER root
|
||||
RUN \
|
||||
chown -R build:build ./src && \
|
||||
rm -r ./target/debug/deps/pict_rs-*
|
||||
rm -r ./target/release/deps/pict_rs-*
|
||||
|
||||
USER build
|
||||
|
||||
RUN cargo build --frozen
|
||||
RUN cargo build --release --frozen
|
||||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
|
@ -169,7 +166,7 @@ RUN \
|
|||
pictrs
|
||||
|
||||
COPY --from=builder /imagemagick /imagemagick
|
||||
COPY --from=builder /opt/build/repo/target/debug/$BINARY /usr/bin/$BINARY
|
||||
COPY --from=builder /opt/build/repo/target/release/$BINARY /usr/bin/$BINARY
|
||||
|
||||
VOLUME /mnt
|
||||
WORKDIR /opt/pictrs
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
FROM rustembedded/cross:x86_64-unknown-linux-gnu AS x86_64-builder
|
||||
|
||||
ARG UID=991
|
||||
ARG GID=991
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
addgroup --gid "${GID}" build && \
|
||||
addgroup --gid 991 build && \
|
||||
adduser \
|
||||
--disabled-password \
|
||||
--gecos "" \
|
||||
--ingroup build \
|
||||
--uid "${UID}" \
|
||||
--uid 991 \
|
||||
--home /opt/build \
|
||||
build
|
||||
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
FROM rustembedded/cross:arm-unknown-linux-gnueabihf AS arm32v7-builder
|
||||
|
||||
ARG UID=991
|
||||
ARG GID=991
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
addgroup --gid "${GID}" build && \
|
||||
addgroup --gid 991 build && \
|
||||
adduser \
|
||||
--disabled-password \
|
||||
--gecos "" \
|
||||
--ingroup build \
|
||||
--uid "${UID}" \
|
||||
--uid 991 \
|
||||
--home /opt/build \
|
||||
build
|
||||
|
||||
|
@ -59,9 +56,6 @@ RUN \
|
|||
libclang-dev \
|
||||
clang \
|
||||
libexpat1-dev:$ARCH && \
|
||||
ln -s /usr/lib/$TOOL/libpcre.so /usr/lib/$TOOL/libpcre.so.3 && \
|
||||
ln -s /usr/lib/$TOOL/libz.so /usr/lib/$TOOL/libz.so.1 && \
|
||||
ln -s /usr/lib/$TOOL/libexpatw.so /usr/lib/$TOOL/libexpat.so.1 && \
|
||||
chown build:build ImageMagick.tar.gz
|
||||
|
||||
|
||||
|
@ -79,7 +73,7 @@ ENV \
|
|||
PKG_CONFIG_PATH=/usr/lib/$TOOL/pkgconfig:/usr/lib/pkgconfig \
|
||||
LD_LIBRARY_PATH=/usr/lib/$TOOL \
|
||||
LD_RUN_PATH=$LD_RUN_PATH:/usr/lib/$TOOL \
|
||||
LDFLAGS="$LDFLAGS -L/usr/lib/$TOOL -Wl,-rpath-link,/usr/lib/$TOOL" \
|
||||
LDFLAGS="$LDFLAGS -L/lib/$TOOL -L/usr/lib/$TOOL -Wl,-rpath-link,/usr/lib/$TOOL" \
|
||||
CFLAGS="$CFLAGS -I/usr/include/$TOOL -I/usr/$TOOL/include -I/usr/include" \
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/include/$TOOL -I/usr/$TOOL/include -I/usr/include"
|
||||
|
||||
|
@ -124,7 +118,7 @@ ENV \
|
|||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/imagemagick/lib \
|
||||
LD_RUN_PATH=$LD_RUN_PATH:/imagemagick/lib \
|
||||
LDFLAGS="$LDFLAGS -L/imagemagick/lib" \
|
||||
RUSTFLAGS="-L/usr/lib/$TOOL -C link-arg=-Wl,-rpath-link,/usr/lib/$TOOL" \
|
||||
RUSTFLAGS="-L/usr/lib/$TOOL -L/lib/$TOOL -C link-arg=-Wl,-rpath-link,/usr/lib/$TOOL -C link-arg=-Wl,-rpath-link,/lib/$TOOL" \
|
||||
IMAGE_MAGICK_LIB_DIRS=/imagemagick/lib \
|
||||
IMAGE_MAGICK_INCLUDE_DIRS=/imagemagick/include/ImageMagick-7 \
|
||||
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/imagemagick/lib/pkgconfig \
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
FROM rustembedded/cross:aarch64-unknown-linux-gnu AS aarch64-builder
|
||||
|
||||
ARG UID=991
|
||||
ARG GID=991
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
addgroup --gid "${GID}" build && \
|
||||
addgroup --gid 991 build && \
|
||||
adduser \
|
||||
--disabled-password \
|
||||
--gecos "" \
|
||||
--ingroup build \
|
||||
--uid "${UID}" \
|
||||
--uid 991 \
|
||||
--home /opt/build \
|
||||
build
|
||||
|
||||
|
|
Loading…
Reference in a new issue