Created
May 12, 2016 19:41
-
-
Save brson/3762a4d581ef867d505f1e83d2d23bc1 to your computer and use it in GitHub Desktop.
Dockerfile for rustup demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt update | |
RUN apt install build-essential curl -y | |
RUN apt install file -y | |
RUN apt install asciinema -y | |
RUN apt install unzip -y | |
RUN apt install emacs24-nox -y | |
RUN apt install vim -y | |
RUN apt install nano -y | |
RUN apt install git -y | |
RUN apt install libssl-dev -y | |
RUN apt install zlib1g-dev -y | |
RUN useradd -ms /bin/bash rust | |
USER rust | |
ENV HOME /home/rust | |
ENV USER rust | |
ENV SHELL /bin/bash | |
WORKDIR /home/rust | |
RUN curl -sSf sh.rustup.rs | sh -s -- -y | |
RUN echo "export PATH=~/.cargo/bin:$PATH" >> ~/.bashrc | |
RUN echo "export PS1='\u:\w$ '" >> ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In general, using many
RUN
is not such a great idea as it creates many layers.Once you validate that you stuff work, you should go from:
to