-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.m1
42 lines (32 loc) · 1.33 KB
/
Dockerfile.m1
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
FROM --platform=linux/arm64/v8 centos:8
RUN cd /etc/yum.repos.d/
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN yum install epel-release -y && \
yum update -y && \
yum install -y git && \
yum install -y jq && \
yum install -y python3 && \
yum install -y python3-pip && \
yum install -y python3-devel && \
yum clean all
RUN curl https://omnitruck.chef.io/install.sh | bash -s -- -P inspec
WORKDIR /opt
RUN mkdir profiles-inspec logs /root/.kube
COPY kube/kubernetes.rb /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/train-core-3.10.1/lib/train/transports/kubernetes.rb
COPY kube/input.rb /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-5.18.14/lib/inspec/input.rb
COPY launch_inspec.sh launch_inspect.sh
COPY requests.sh post_requests.sh
COPY app.py app.py
COPY inspec.py inspec.py
COPY config.py config.py
COPY start.sh start.sh
COPY requirements.txt requirements.txt
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.20.0/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl && \
kubectl version --help
RUN pip3 install --user -r requirements.txt
RUN chmod +x start.sh
ENTRYPOINT ["/opt/start.sh"]
EXPOSE 5000/tcp