diff --git a/Dockerfile b/Dockerfile
index 8bd7b0b664f6a1f7aedacc5f48c064820a916023..b78f88ed780c195a60cef14407e69825dec3b690 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -30,16 +30,12 @@ WORKDIR /builder
 ENV PYENV_ROOT "/builder/.pyenv"
 USER builder
 RUN git clone https://github.com/pyenv/pyenv.git /builder/.pyenv && \
-    echo "export PYENV_ROOT=$PYENV_ROOT" >> /builder/.bashrc && \
-    echo "export PATH=$PYENV_ROOT/bin:$PATH" >> /builder/.bashrc
-
-USER builder
-RUN PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --force 3.5.5 && \
+    export PATH=$PYENV_ROOT/bin:$PATH
+    PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --force 3.5.5 && \
     PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --force 3.6.4
 
     
 USER root
-
 # Entry point
 COPY bootstrap.sh /root/bootstrap.sh
 RUN chmod u+x /root/bootstrap.sh