forked from Azure/azure-diskinspect-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (49 loc) · 1.69 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
# This file creates a container that runs nginx and a libguestfs python web service
# The libguestfs service provides a way to extract log files from a SAS uri of an
# Azure blob as a zip archive.
FROM ubuntu:18.04
# package dependencies
COPY conf/sources.list /etc/apt/sources.list
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
autoconf \
git \
nginx \
libjansson-dev \
ocaml \
libhivex-ocaml \
libhivex-ocaml-dev \
python3-pip \
libssl-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get build-dep -y \
libguestfs
# Install Credential Scanner dependencies
WORKDIR /
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/ubuntu bionic main" | tee /etc/apt/sources.list.d/mono-official.list
RUN apt-get update && apt-get install -y mono-complete
# patched libguestfs
WORKDIR /
RUN git clone https://github.com/chintanrp/libguestfs.git
WORKDIR /libguestfs
RUN ./autogen.sh \
&& make ; rm -f po-docs/podfiles; make -C po-docs update-po
RUN make
# extractor service
RUN rm -v /etc/nginx/nginx.conf
COPY conf/nginx.conf /etc/nginx/
COPY pyServer/* /azureDiskInspectSvc/
COPY pyServer/manifests/ /etc/azdis/
# Redirect python3 as default
RUN ln -s -f /usr/bin/python3 /usr/bin/python
# Install AppInsights
RUN pip3 install azure-storage-blob==1.4.0
RUN pip3 install applicationinsights==0.11.9
# Expose port 8080 for nginx
EXPOSE 8080
#Setup docker entrypoint and start the nginx service
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]