1
- FROM ubuntu:16.04
1
+ FROM ubuntu:18.04 as builder
2
+
2
3
MAINTAINER Marco Slaviero <
[email protected] >
4
+
3
5
LABEL Description="This image provides the frontend site for Canarytokens" Vendor="Thinkst Applied Research" Version="1.4"
4
- RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget python-pip unzip osslsigncode gcc python-dev libreadline-dev libncurses5-dev libffi-dev gcc patch make libxslt-dev libxml2-dev libz-dev fortune-mod fortunes libssl-dev && rm -rf /var/lib/apt/lists/*
6
+ # setting the current directory
5
7
WORKDIR /
6
- RUN pip install -U setuptools
7
- RUN pip install --upgrade pip
8
- RUN pip install --no-cache-dir pyOpenSSL==16.2.0
9
- RUN pip install --no-cache-dir Jinja2==2.9.4
10
- RUN pip install --no-cache-dir MarkupSafe==0.23
11
- RUN pip install --no-cache-dir Twisted==15.2.1
12
- RUN pip install --no-cache-dir cssselect==0.9.1
13
- RUN pip install --no-cache-dir docopt==0.4.0
14
- RUN pip install --no-cache-dir gnureadline==6.3.3
15
- RUN pip install --no-cache-dir httplib2==0.9.1
16
- RUN pip install --no-cache-dir lxml==3.4.4
17
- RUN pip install --no-cache-dir mandrill==1.0.57
18
- RUN pip install --no-cache-dir pytz==2015.4
19
- RUN pip install --no-cache-dir redis==2.10.3
20
- RUN pip install --no-cache-dir requests==2.20.0
21
- RUN pip install --no-cache-dir simplejson==3.7.3
22
- RUN pip install --no-cache-dir six==1.10.0
23
- RUN pip install --no-cache-dir twilio==4.4.0
24
- RUN pip install --no-cache-dir twill==1.8.0
25
- RUN pip install --no-cache-dir wsgiref==0.1.2
26
- RUN pip install --no-cache-dir zope.interface==4.1.2
27
- RUN pip install --no-cache-dir PyQRCode==1.2.1
28
- RUN pip install --no-cache-dir pypng==0.0.18
29
- RUN pip install --no-cache-dir htmlmin==0.1.10
30
- RUN pip install --no-cache-dir sendgrid==3.6.5
31
- RUN pip install --no-cache-dir service_identity
32
-
33
- RUN wget -O master.zip https://github.com/thinkst/canarytokens/archive/master.zip?step=22
34
- RUN unzip master.zip
35
- RUN mv /canarytokens-master/* /srv
36
- RUN rm -rf /canarytokens-master
8
+ # uploading PIP requirements file into the base image
9
+ COPY requirements.txt ./
10
+ # removing PIP deprecation banners
11
+ ENV PIP_DISABLE_PIP_VERSION_CHECK=1
12
+ # concatenating RUN commands into a single image layer
13
+ # installing PIP requirements from requirements.txt file
14
+ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
15
+ wget python-pip unzip osslsigncode gcc python-dev libreadline-dev \
16
+ libncurses5-dev libffi-dev gcc patch make libxslt-dev libxml2-dev \
17
+ libz-dev fortune-mod fortunes libssl-dev && \
18
+ rm -rf /var/lib/apt/lists/* && \
19
+ pip install -U setuptools && \
20
+ pip install --upgrade pip && \
21
+ pip install --no-cache-dir -r requirements.txt && \
22
+ wget -O master.zip https://github.com/thinkst/canarytokens/archive/master.zip?step=22 && \
23
+ unzip master.zip && \
24
+ mv /canarytokens-master/* /srv && \
25
+ rm -rf /canarytokens-master
26
+ # discarding the build-stage image and adding a new one
27
+ # with only the necessary binaries/libraries to run the app
28
+ FROM builder as canary-tokens
29
+ # copy the working directory from the previous image into the final image
30
+ COPY --from=builder /srv /srv
31
+ # seting the working environment
37
32
WORKDIR /srv
38
33
39
- CMD echo "Please use the docker-compose setup described at https://github.com/thinkst/canarytokens-docker"
34
+ CMD echo "Please use the docker-compose setup described at https://github.com/thinkst/canarytokens-docker"
0 commit comments