How to build Docker images quciker

I’m currently building a docker image and running the container to run some tests in it on for a Python application I’m working on. Currently the Dockerfile copies the files over from the host machine, sets the working directory to those copied files, runs a sudo-apt get and installs pip, and finally runs the tests from The Dockerfile can be seen below.

`FROM ubuntu

ADD . /home/dev/ProjectName

WORKDIR /home/dev/ProjectName

RUN apt-get update && \
    apt-get install -y python3-pip && \
    python3 test


  • SQL Server Express does not start on running docker container (Windows)
  • How to reduce my java/gradle docker image size?
  • Google container registry golang moby authentication
  • Sonatype Nexus 3 - Scripting Docker Image Cleanup?
  • Ensure node is running at least a certain kernel version?
  • Referencing files inside build (Docker)
  • I was curious if there was a more conventional way to avoid having to run the apt-get and apt-get install pip every time I’d like to run a test. The main idea I had was to build an image with pip already on it, and then build this image from that one.

  • what is the exact difference between YAML version 1 and YAML version 2?
  • Error defining a task on Amazon Container Service
  • Bluemix scalable container group custom domain SSL certificate
  • Remove port binding from an existing docker container
  • Multi Host : Docker Networking
  • Checking File Checksum In Alpine
  • One Solution collect form web for “How to build Docker images quciker”

    Docker builds using cached layers if it can. By adding files you have changed it invalidates the cache for all subsequent rules. Put the apt commands first and those will only be run the first time you build. See this blog for more info.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.