mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 21:33:09 +00:00
de2d72248e
using --no-cache-dir flag in pip install ,make sure downloaded packages by pip don't cached on system . This is a best practice which make sure to fetch from repo instead of using local cached one . Further , in case of Docker Containers , by restricting caching , we can reduce image size. In term of stats , it depends upon the number of python packages multiplied by their respective size . e.g for heavy packages with a lot of dependencies it reduce a lot by don't caching pip packages. Further , more detail information can be found at https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6 Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
36 lines
692 B
Docker
36 lines
692 B
Docker
# Dockerfile for GNS3 server development
|
|
|
|
FROM ubuntu:18.04
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
# Set the locale
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US:en
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
RUN apt-get update && apt-get install -y software-properties-common
|
|
RUN add-apt-repository ppa:gns3/ppa
|
|
RUN apt-get update && apt-get install -y \
|
|
locales \
|
|
python3-pip \
|
|
python3-dev \
|
|
qemu-system-x86 \
|
|
qemu-kvm \
|
|
libvirt-bin \
|
|
x11vnc
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
|
|
# Install uninstall to install dependencies
|
|
RUN apt-get install -y vpcs ubridge
|
|
|
|
ADD . /server
|
|
WORKDIR /server
|
|
|
|
RUN pip3 install --no-cache-dir -r /server/requirements.txt
|
|
|
|
EXPOSE 3080
|
|
|
|
CMD python3 -m gns3server
|