-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split libvcx alpine image build in 2 phases
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
- Loading branch information
1 parent
e76270f
commit a5e52b7
Showing
5 changed files
with
106 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM alpine:3.12 AS builder | ||
|
||
ARG UID=1000 | ||
ARG GID=1000 | ||
|
||
|
||
ARG INDYSDK_PATH=/home/indy/indy-sdk | ||
ARG INDYSDK_REPO=https://github.com/hyperledger/indy-sdk.git | ||
ARG INDYSDK_REVISION=v1.15.0 | ||
|
||
ENV RUST_LOG=warning | ||
|
||
RUN addgroup -g $GID indy && adduser -u $UID -D -G indy indy | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache \ | ||
build-base \ | ||
cargo \ | ||
git \ | ||
libsodium-dev \ | ||
libzmq \ | ||
openssl-dev \ | ||
rust \ | ||
zeromq-dev | ||
|
||
USER indy | ||
WORKDIR /home/indy | ||
|
||
RUN git clone $INDYSDK_REPO && cd indy-sdk && git checkout $INDYSDK_REVISION | ||
|
||
RUN cargo build --release --manifest-path=$INDYSDK_PATH/libindy/Cargo.toml | ||
|
||
USER root | ||
RUN mv $INDYSDK_PATH/libindy/target/release/libindy.so /usr/lib | ||
|
||
USER indy | ||
RUN cargo build --release --manifest-path=$INDYSDK_PATH/libnullpay/Cargo.toml | ||
RUN cargo build --release --manifest-path=$INDYSDK_PATH/experimental/plugins/postgres_storage/Cargo.toml | ||
|
||
USER root | ||
RUN mv $INDYSDK_PATH/libnullpay/target/release/libnullpay.so . | ||
RUN mv $INDYSDK_PATH/experimental/plugins/postgres_storage/target/release/libindystrgpostgres.so . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.