-
Notifications
You must be signed in to change notification settings - Fork 719
/
Dockerfile.jdk8
63 lines (55 loc) · 2.02 KB
/
Dockerfile.jdk8
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
##############################################################################################
# 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 \
openjdk-8-jdk \
openssh-client \
gcc \
git \
libdb-dev libleveldb-dev libsodium-dev zlib1g-dev libtinfo-dev \
jq \
npm
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
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.0/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin
# 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
# 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"]