Skip to content

Instantly share code, notes, and snippets.

@outrunthewolf
Created October 11, 2013 08:28
Show Gist options
  • Save outrunthewolf/6931446 to your computer and use it in GitHub Desktop.
Save outrunthewolf/6931446 to your computer and use it in GitHub Desktop.
untar and moving directory in Dockerfile - a bad way
RUN cd /home/$USERNAME
RUN mkdir downloads
RUN cd downloads
RUN wget http://www.something.com/test.tar.gz
RUN tar -zxvf test.tar.gz
RUN cd test
RUN ./configure
@tianon
Copy link

tianon commented Oct 11, 2013

Try something like:

RUN cd /home/$USERNAME && \
  mkdir downloads && \
  cd downloads && \
  wget http://www.something.com/test.tar.gz && \
  tar -zxvf test.tar.gz && \
  cd test && \
  ./configure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment