-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.proxy
47 lines (38 loc) · 1.72 KB
/
Dockerfile.proxy
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
FROM phusion/baseimage:0.11
MAINTAINER [email protected]
# ...put your own build instructions here...
# Install min deps and helpful tools
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y apt-utils \
&& apt-get install -y wget \
&& apt-get install -y iproute2 iputils-ping
# Uncomment *one* of the sections below to get salt 2018.3 or 2017.7
# 2018.3 salt installation for Ubuntu 18 (bionic)
RUN echo 'deb http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2018.3 bionic main' >> /etc/apt/sources.list.d/saltstack.list \
&& wget -O - https://repo.saltstack.com/apt/ubuntu/18.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub | apt-key add - \
&& apt-get update
# 2017.7 salt installation for Ubuntu 18 (bionic)
#RUN echo 'deb http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2017.7 bionic main' >> /etc/apt/sources.list.d/saltstack.list \
# && wget -O - https://repo.saltstack.com/apt/ubuntu/18.04/amd64/2017.7/SALTSTACK-GPG-KEY.pub | apt-key add - \
# && apt-get update
# Install the Salt minion
RUN apt-get install -y salt-minion
## Copy the Proxy config file
ADD proxy /etc/salt/proxy
## Install NAPALM & underlying libraries dependencies
## Will install all NAPALM sub-libraries
RUN apt-get install -y python-cffi python-dev libxslt1-dev libssl-dev libffi-dev \
&& apt-get install -y python-pip \
&& pip install -U cffi \
&& pip install -U cryptography \
&& pip install napalm \
&& pip install napalm-yang
# Salt Proxy service
RUN mkdir /etc/service/salt-proxy
ADD run-proxy.sh /etc/service/salt-proxy/run
RUN chmod +x /etc/service/salt-proxy/run
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]