-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
62 lines (38 loc) · 1.47 KB
/
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
#FROM ubuntu:20.04 AS base
FROM docker.io/node:18.19.1-bullseye AS base
ARG LOADDIR="/load-agent"
## Using requirements from https://aries.js.org/guides/getting-started/installation/nodejs/linux
# Setup NodeJS environment for AFJ
ENV TZ=America/Denver
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update -y && apt-get install -y curl gcc g++ make git libssl-dev pkg-config
#RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
#RUN apt-get update -y && apt-get install -y nodejs
#RUN npm install --global yarn
RUN yarn global add ts-node typescript
RUN apt-get install -y libsodium-dev libzmq3-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust.sh && sh -- rust.sh -y
RUN git clone https://github.com/hyperledger/indy-sdk
RUN cd indy-sdk/libindy && \
git checkout v1.16.0 && \
/root/.cargo/bin/cargo build --release && \
mv target/release/libindy.so /usr/lib/libindy.so
# Setup Locust
RUN apt-get install -y python3-pip
RUN pip3 install locust==2.14.2
FROM base AS dev
# Setup Dev environment
RUN apt-get install -y tmux htop
# Include global arg in this stage of the build
ARG LOADDIR
# Set working directory to function root directory
WORKDIR ${LOADDIR}
FROM base AS release
# Include global arg in this stage of the build
ARG LOADDIR
# Set working directory to function root directory
WORKDIR ${LOADDIR}
ADD ./load-agent load-agent
WORKDIR ${LOADDIR}/load-agent
RUN yarn install
CMD "locust"