forked from hyperledger-bevel/bevel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (57 loc) · 2.13 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
63
64
65
66
67
68
69
70
71
##############################################################################################
# Copyright Accenture. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
##############################################################################################
# USAGE:
# docker build . -t bevel-build
# docker run -v $(pwd):/home/bevel/ bevel-build
FROM ubuntu:20.04
# Create working directory
WORKDIR /home/
ENV OPENSHIFT_VERSION='0.13.1'
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
wget\
curl \
unzip \
build-essential \
openssh-client \
gcc \
git \
libdb-dev libleveldb-dev libsodium-dev zlib1g-dev libtinfo-dev \
jq \
npm
# Install OpenJDK-14
RUN wget https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz \
&& tar xvf openjdk-14_linux-x64_bin.tar.gz \
&& rm openjdk-14_linux-x64_bin.tar.gz
RUN apt-get update && apt-get install -y \
python3-pip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
pip3 install ansible && \
pip3 install jmespath && \
pip3 install openshift==${OPENSHIFT_VERSION} && \
apt-get clean && \
ln -s /usr/bin/python3 /usr/bin/python && \
rm -rf /var/lib/apt/lists/*
RUN npm install -g ajv-cli
RUN apt-get update && apt-get install -y python3-venv
RUN rm /etc/apt/apt.conf.d/docker-clean
RUN mkdir /etc/ansible/
RUN /bin/echo -e "[ansible_provisioners:children]\nlocal\n[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# Copy the provisional script to build container
COPY ./run.sh /home
COPY ./reset.sh /home
RUN chmod 755 /home/run.sh
RUN chmod 755 /home/reset.sh
ENV PATH=/root/bin:/root/.local/bin/:$PATH
ENV JAVA_HOME=/home/jdk-14
ENV PATH=/home/jdk-14/bin:$PATH
# The mounted repo should contain a build folder with the following files
# 1) K8s config file as config
# 2) Network specific configuration file as network.yaml
# 3) Private key file which has write-access to the git repo
#path to mount the repo
VOLUME /home/bevel/
CMD ["/home/run.sh"]