-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (58 loc) · 3.75 KB
/
Dockerfile
File metadata and controls
69 lines (58 loc) · 3.75 KB
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
64
65
66
67
68
69
FROM amd64/alpine:latest
ARG harvestgraph_version
ENV AKAMAI_CLI_HOME=/cli
RUN apk add --no-cache --update openssl \
ca-certificates \
libc6-compat \
libstdc++ \
wget \
curl \
jq \
bash \
nodejs \
npm \
graphviz \
font-bitstream-type1 && \
rm -rf /var/cache/apk/* && \
wget --quiet -O /usr/local/bin/akamai "https://github.com/akamai/cli/releases/download/$(curl -sI https://github.com/akamai/cli/releases/latest | grep -Fi 'Location:' | rev | cut -d '/' -f1 | rev | tr -d '\r')/akamai-$(curl -sI https://github.com/akamai/cli/releases/latest | grep -Fi 'Location:' | rev | cut -d '/' -f1 | rev | tr -d '\r')-linuxamd64" && \
chmod +x /usr/local/bin/akamai && \
echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' >> /root/.bashrc
RUN mkdir -p /cli/.akamai-cli && \
echo "[cli]" > /cli/.akamai-cli/config && \
echo "cache-path = /cli/.akamai-cli/cache" >> /cli/.akamai-cli/config && \
echo "config-version = 1" >> /cli/.akamai-cli/config && \
echo "enable-cli-statistics = false" >> /cli/.akamai-cli/config && \
echo "last-ping = 2018-04-27T18:16:12Z" >> /cli/.akamai-cli/config && \
echo "client-id =" >> /cli/.akamai-cli/config && \
echo "install-in-path =" >> /cli/.akamai-cli/config && \
echo "last-upgrade-check = ignore" >> /cli/.akamai-cli/config
RUN akamai install https://github.com/apiheat/akamai-cli-netlist --force && \
rm -rf /cli/.akamai-cli/src/akamai-cli-netlist/.git
RUN akamai install appsec --force && \
rm -rf /cli/.akamai-cli/src/cli-appsec/.git
RUN wget --quiet -O /usr/local/bin/harvestgraph https://github.com/apiheat/harvestgraph/releases/download/v$harvestgraph_version/harvestgraph_linux_amd64 && \
chmod +x /usr/local/bin/harvestgraph
RUN echo ' ' > /etc/motd && \
echo ' _ _ ' >> /etc/motd && \
echo ' | | _ | | ' >> /etc/motd && \
echo ' | | _ ____ ____ _ _ ____ ___| |_ ____ ____ ____ ____ | | _ ' >> /etc/motd && \
echo ' | || \ / _ |/ ___) | | / _ )/___) _)/ _ |/ ___) _ | _ \| || \ ' >> /etc/motd && \
echo ' | | | ( ( | | | \ V ( (/ /|___ | |_( ( | | | ( ( | | | | | | | | ' >> /etc/motd && \
echo ' |_| |_|\_||_|_| \_/ \____|___/ \___)_|| |_| \_||_| ||_/|_| |_| ' >> /etc/motd && \
echo ' (_____| |_| ' >> /etc/motd && \
echo ' ====================================================================' >> /etc/motd && \
echo ' = Welcome to the harvestgraph cli for Akamai =' >> /etc/motd && \
echo ' ====================================================================' >> /etc/motd && \
echo ' = Project page: =' >> /etc/motd && \
echo ' = https://github.com/apiheat/harvestgraph =' >> /etc/motd && \
echo ' ====================================================================' >> /etc/motd && \
echo ' = CLI versions: =' >> /etc/motd && \
echo " * $(harvestgraph --version)" >> /etc/motd && \
echo " * akamai appsec version v$(akamai appsec --version)" >> /etc/motd && \
echo " * $(akamai netlist --version)" >> /etc/motd && \
echo " * $(akamai --version)" >> /etc/motd && \
echo ' ====================================================================' >> /etc/motd
ENV AKAMAI_CLI_HOME=/cli
VOLUME /cli
VOLUME /root/.edgerc
CMD ["/bin/bash"]