-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile.worker
28 lines (23 loc) · 1.18 KB
/
Dockerfile.worker
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
FROM alpine:3.6
MAINTAINER [email protected]
# Add docker
RUN apk --no-cache --update add docker
# Add aws cli
RUN apk --no-cache --update add bash curl less groff jq python py-pip && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir awscli==1.18.87 s3cmd==2.1.0 https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-1.4-24.tar.gz && \
mkdir /root/.aws && \
aws --version && \
s3cmd --version
# Install kubectl
RUN mkdir -p /usr/local/bin \
&& echo Downloading https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \
&& curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \
&& chmod +x kubectl \
&& mv kubectl /usr/local/bin
# Install application binary
COPY ./kube-forensics-worker.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/kube-forensics-worker.sh
# This is a 'oneshot' batch job pod. Run the command and terminate.
CMD ["bash", "/usr/local/bin/kube-forensics-worker.sh"]
ENTRYPOINT []