forked from Juniper/py-junos-eznc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (22 loc) · 779 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
FROM alpine:3.6
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 add --no-cache build-base python3-dev py-lxml \
libxslt-dev libxml2-dev libffi-dev openssl-dev curl \
ca-certificates openssl wget \
&& pip3 install -r requirements.txt \
&& apk del -r --purge gcc make g++ \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& pip3 install . \
&& rm -rf /source/* \
&& rm -rf /var/cache/apk/*
WORKDIR /scripts
VOLUME /scripts