aboutsummaryrefslogtreecommitdiffstats
path: root/ransim/docker/ransim-docker/Dockerfile
blob: b139fef7e3facdcf96a688992c42148cb185a7d8 (plain)
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
FROM ubuntu:18.04

ARG HTTP_PROXY=${HTTP_PROXY}
ARG HTTPS_PROXY=${HTTPS_PROXY}

ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY

RUN \
apt-get clean && \
apt-get update && \
apt-get install -y zip unzip curl wget ssh telnet maven && \
apt-get install -y software-properties-common && \
apt-get install -y jq httpie && \
apt-get install -y python-pip && \
apt-get install -y vim && \
add-apt-repository ppa:openjdk-r/ppa && \
apt-get clean && \
apt-get update && \
apt-get install -y openjdk-8-jdk

RUN useradd --create-home --shell /bin/bash policy

RUN \
    apt-get install -y apt-transport-https && \
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 && \
add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu bionic main' && \
apt-get clean && \
apt-get update && \
apt-get install -y mariadb-client

RUN mkdir -p /opt/app/policy /tmp/ransim-install && chown policy /opt/app/policy /tmp/ransim-install

WORKDIR /tmp/ransim-install

COPY install.zip docker-install.sh do-start.sh wait-for-port.sh ./
RUN unzip install.zip && rm install.zip && chown policy * && chmod +x *.sh

USER policy

ENTRYPOINT [ "bash", "./do-start.sh" ]