Skip to content

Commit

Permalink
Switch Docker image to Python 3 and reduce the number of layers and s…
Browse files Browse the repository at this point in the history
…ize (#980)
  • Loading branch information
mirceaulinic authored May 13, 2019
1 parent c11ae8b commit e0cc9af
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
FROM debian:stretch

## Install min deps
RUN apt-get update
FROM python:3.6-slim-stretch

COPY ./ /var/cache/napalm/

## Install NAPALM & underlying libraries dependencies
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 /var/cache/napalm/

RUN rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y python-dev python-cffi libxslt1-dev libssl-dev libffi-dev \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* \
&& pip --no-cache-dir install -U cffi cryptography /var/cache/napalm/ \
&& rm -rf /var/cache/napalm/

0 comments on commit e0cc9af

Please sign in to comment.