generated from morancj/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (54 loc) · 1.73 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:14.04
# Install outdated software
# https://ubuntu.com/security/CVE-2017-5754
ARG FIREFOX_VERSION
ENV FIREFOX_VERSION ${FIREFOX_VERSION:-28.0+build2-0ubuntu2}
ARG NPM_VERSION
ENV NPM_VERSION ${NPM_VERSION:-1.3.10~dfsg-1}
ARG NODEJS_VERSION
ENV NODEJS_VERSION ${NODEJS_VERSION:-0.10.25~dfsg2-2ubuntu1.2}
ARG NODEJS_LEGACY_VERSION
ENV NODEJS_LEGACY_VERSION ${NODEJS_LEGACY_VERSION:-0.10.25~dfsg2-2ubuntu1}
ARG PYTHON_VERSION
ENV PYTHON_VERSION ${PYTHON_VERSION:-2.7.5-5ubuntu3}
ENV VERSIONED_PACKAGES \
firefox=${FIREFOX_VERSION}\
npm=${NPM_VERSION}\
nodejs=${NODEJS_VERSION}\
nodejs-legacy=${NODEJS_LEGACY_VERSION}\
python=${PYTHON_VERSION}
ENV FLUX_INSTALL_SCRIPT https://fluxcd.io/install.sh
ENV MCCP_DOWNLOAD_URL https://weaveworks-wkp.s3.amazonaws.com/mccp-master-linux-amd64
# Install software and cleanup
# Tell apt not to use interactive prompts
RUN export DEBIAN_FRONTEND=noninteractive && \
# apt-get update && \
apt-get update
RUN apt-get install -y --no-install-recommends \
# Install packages
curl \
${VERSIONED_PACKAGES} \
awscli=1.2.9-2 \
&& \
# Clean up package cache in this layer
# Remove dependencies which are no longer required
apt-get --purge autoremove -y && \
# Clean package cache
apt-get clean -y && \
# Restore interactive prompts
unset DEBIAN_FRONTEND && \
# Remove cache files
rm -rf \
/tmp/* \
/var/cache/* \
/var/log/* \
/var/lib/apt/lists/*
# Use the 'curl | bash' antipattern to install flux
RUN curl -s $FLUX_INSTALL_SCRIPT | sudo bash
# Use curl to download a binary into /bin
RUN curl -o /bin/mccp $MCCP_DOWNLOAD_URL && \
chmod 0755 /bin/mccp
# Copy AWS example credentials, entirely unprotected
COPY .aws /root/.aws
#Set root´s password to something silly
RUN echo 'root:root' | chpasswd