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


  • docker-machine virtualbox image locations on OSX
  • Docker file permissions with volumes, Boot2docker and Virtualbox
  • Apache Ignite cache operation failure
  • Why docker uses port numbers from 32768-65535?
  • Architecture for scheduler jobs in AWS ECS [closed]
  • Odoo Blank screen with no UI , on docker container setup on AWS
  • 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 directory does a Docker build start in?
  • Getting “can't cd” error when when building using dockerfile
  • How to set hwaddr in docker 0.9.x
  • Compute Engine / gcloud in VM - is this the right way?
  • password define for ssh connection into docker container
  • Using Docker Environment Variables in Angular2 application
  • 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.