-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (38 loc) · 1.12 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
FROM ubuntu:18.04 as builder
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
curl \
patch \
openjdk-8-jdk-headless \
openjfx \
libopenjfx-java \
libopenjfx-jni \
; \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 -s /bin/bash tron
USER tron
ARG VERSION
RUN set -ex; \
mkdir /home/tron/tron-rosetta-api; \
curl -L https://github.com/tronprotocol/tron-rosetta-api/archive/v${VERSION}.tar.gz | tar -xz --strip-components=1 -C /home/tron/tron-rosetta-api
RUN set -ex; \
cd /home/tron/tron-rosetta-api; \
./gradlew build -x test
FROM ubuntu:18.04
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
curl \
patch \
openjdk-8-jre-headless \
openjfx \
libopenjfx-java \
libopenjfx-jni \
; \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /home/tron/tron-rosetta-api/build/libs/tron-rosetta-api-1.0.0.jar /opt/tron-rosetta-api.jar
RUN curl -o /opt/config.conf -L https://raw.githubusercontent.com/tronprotocol/tron-rosetta-api/master/src/main/resources/net_conf/mainnet.conf
RUN useradd -m -u 1000 -s /bin/bash tron
USER tron
WORKDIR /opt/data