forked from Juniper/py-junos-eznc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (26 loc) · 912 Bytes
/
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
FROM alpine:3.6
LABEL MAINTAINER="Stephen Steiner <[email protected]>"
LABEL net.juniper.description="Junos PyEZ library for Python in a lightweight container." \
net.juniper.maintainer="Stephen Steiner <[email protected]>"
RUN mkdir /source \
&& mkdir /scripts
WORKDIR /source
## Copy project inside the container
ADD setup.py setup.py
ADD requirements.txt requirements.txt
ADD lib lib
## Install dependancies and Pyez
RUN apk update \
&& apk upgrade \
&& apk add build-base python-dev py-pip py-lxml \
libxslt-dev libxml2-dev libffi-dev openssl-dev curl \
ca-certificates openssl wget \
&& update-ca-certificates \
&& pip install --upgrade pip setuptools \
&& pip install -r requirements.txt \
&& apk del -r --purge gcc make g++ \
&& python setup.py install \
&& rm -rf /source/* \
&& rm -rf /var/cache/apk/*
WORKDIR /scripts
VOLUME /scripts