forked from Juniper/ansible-junos-stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (22 loc) · 861 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
FROM juniper/pyez:2.5.3
LABEL net.juniper.image.maintainer="Juniper Networks <[email protected]>" \
net.juniper.image.description="Lightweight image with Ansible and the Junos roles"
RUN apk add --no-cache build-base python3-dev py3-pip \
openssl-dev curl ca-certificates bash openssh-client
WORKDIR /tmp
COPY requirements.txt .
RUN pip3 install -r requirements.txt
RUN apk del -r --purge gcc make g++ &&\
rm -rf /source/* &&\
rm -rf /var/cache/apk/* &&\
rm -rf /tmp/*
WORKDIR /usr/share/ansible/collections/ansible_collections/
COPY ansible_collections/ .
WORKDIR /usr/bin
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
# Also install the roles, until collections is ready for prime-time
RUN ansible-galaxy role install Juniper.junos,2.4.3
WORKDIR /project
VOLUME /project
ENTRYPOINT ["/usr/bin/entrypoint.sh"]