diff --git a/Dockerfile b/Dockerfile
index 4765c1c8af5bd75f5421246c0e2225505482d9e7..d96c40a5016e105bd8004bbad6fb4efc5bf04676 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,11 +2,10 @@ ARG cuda_version=10.0
 ARG cudnn_version=7
 FROM nvidia/cuda:${cuda_version}-cudnn${cudnn_version}-devel
 
-RUN apt-get install apt-transport-https ca-certificates curl software-properties-common
+RUN apt-get update && apt-get install apt-transport-https ca-certificates curl software-properties-common
 RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
-RUN apt-get update
-RUN apt-get install docker-ce
+RUN apt-get update && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
+RUN apt-get update && apt-get install docker-ce
 
 # Install system packages
 RUN apt-get update && apt-get install -y --no-install-recommends \