forked from AbsaOSS/vcxagencynode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvcxagency-base.Dockerfile
74 lines (56 loc) · 1.63 KB
/
vcxagency-base.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM alpine:3.12 AS builder
ARG UID=1001
ARG GID=1001
ARG INDYSDK_PATH=/home/indy/indy-sdk
ARG INDYSDK_REPO=https://github.com/hyperledger/indy-sdk.git
ARG INDYSDK_REVISION=v1.15.0
ENV LC_ALL="C.UTF-8"
ENV LANG="C.UTF-8"
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 \
sqlite-dev \
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/experimental/plugins/postgres_storage/Cargo.toml
USER root
RUN mv $INDYSDK_PATH/experimental/plugins/postgres_storage/target/release/libindystrgpostgres.so /usr/lib
FROM alpine:3.12
ARG UID=1001
ARG GID=1001
ENV LC_ALL="C.UTF-8"
ENV LANG="C.UTF-8"
RUN addgroup -g $GID node && adduser -u $UID -D -G node node
COPY --from=builder /usr/lib/libindy.so /usr/lib/libindystrgpostgres.so /usr/lib/
RUN apk update && apk upgrade
RUN apk add --no-cache \
bash \
g++ \
gcc \
libsodium-dev \
libzmq \
make \
nodejs \
npm \
openssl-dev \
python2 \
sqlite-dev \
zeromq-dev
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.name="indy-sdk"
LABEL org.label-schema.version="${INDYSDK_REVISION}"