-
Notifications
You must be signed in to change notification settings - Fork 2
/
v3.dockerfile
47 lines (37 loc) · 1.17 KB
/
v3.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
# run layer
FROM centos:7 as run
# Install bare minimum things for our stack. We don't need anything flashy
# We will let the user install their own things. However, PowerTools is enabled for good measure.
RUN yum update -y && \
yum install -y epel-release && \
yum install -y \
dnf-plugins-core \
sudo \
wget \
curl \
python38 \
python27 \
python2-dnf \
ansible \
nodejs \
clang \
git \
cmake \
&& \
yum group install "Development tools" -y
# Create the user
RUN adduser user -u 1000 -g 0 -r -m -d /home/user/ -c "Default Application User" -l && \
echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/user && \
chmod 0440 /etc/sudoers.d/user;
# Add workspace and set permissions
RUN mkdir -p /workspace && \
chown -R user:root /workspace && \
chmod -R g+rw /workspace;
WORKDIR /opt
USER 1000
RUN curl -sSL https://github.com/gbraad/ansible-playbooks/raw/master/playbooks/install-c9sdk.yml -o /tmp/install.yml && \
ansible-playbook /tmp/install.yml && \
rm -rf /tmp/install.yml;
EXPOSE 8181
ADD --chown=user:root run_v3.sh .
CMD ["/opt/run_v3.sh"]