-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.OGC.MINGW
49 lines (37 loc) · 1.79 KB
/
Dockerfile.OGC.MINGW
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
FROM registry.gitlab.com/cryptohouse/onegramdev/mingw-dependencies:latest as builder
MAINTAINER Jozef Knaperek <[email protected]>
ARG uid=1000
ARG gid=1000
RUN groupadd --gid $gid -r onegram && useradd --uid $uid --create-home --system -g onegram onegram
COPY . /src
# Use BUILD=Release for production builds
ARG BUILD=Debug
# Use TARGET=witness_node to only build witness_node
ARG TARGET=
# Use TARGET_ENV=MAINNET to produce mainnet build (using mainnet genesis file, seed-nodes, and other environment specific options)
# Use TARGET_ENV=TESTNET to produce testnet build (using testnet genesis file, seed-nodes, and other environment specific options)
ARG TARGET_ENV=TESTNET
# Fill these args from version control system in your build script
ARG REVISION_SHA=a1b2c3d4
ARG REVISION_TIMESTAMP=1521619797
RUN cd /src \
&& cmake -G Ninja -DTARGET_ENV=$TARGET_ENV -DCMAKE_BUILD_TYPE=$BUILD -DREVISION_SHA=$REVISION_SHA -DREVISION_TIMESTAMP=$REVISION_TIMESTAMP \
-DCMAKE_TOOLCHAIN_FILE="/src/toolchain_mingw.cmake" \
-DBOOST_INCLUDEDIR="/dependencies/boost/" \
-DOPENSSL_ROOT_DIR="/dependencies/openssl/" \
-DOPENSSL_INCLUDE_DIR="/dependencies/openssl/include/" \
-DOPENSSL_SSL_LIBRARY="/dependencies/openssl/libssl.a" \
-DOPENSSL_CRYPTO_LIBRARY="/dependencies/openssl/libcrypto.a" \
-DZLIB_ROOT="/dependencies/zlib/" \
-DCURL_LIBRARY="/dependencies/curl/lib/libcurl.a" \
-DCURL_INCLUDE_DIR="/dependencies/curl/include/"\
. \
&& ninja $TARGET \
&& mkdir -p /release/tests \
&& find programs -type f -name "*.exe" -exec cp {} /release \; \
&& find tests -type f -name "*.exe" -exec cp {} /release/tests \; \
&& ls /release -l
# Use the following to embed genesis config into the binary:
# cmake -DGRAPHENE_EGENESIS_JSON="/home/onegram/onegram-genesis.json"
WORKDIR /home/onegram
USER onegram