redox/docker/Dockerfile
Andre Richter 6e3c76ea23
docker: Switch to official Rust image as base and rework
1. Use the official Rust nightly docker image as base
2. Remove hardcoded user
3. Use named volumes to cache .rustup and .cargo toolchain folders
    - Changing file permissions to user (chown) only needed on first launch
4. Cleanup apt folders after installing
5. Make bash the default fallback command
6. README.md: Unify workflows for Linux and MacOS
2017-09-02 21:51:46 +02:00

38 lines
2.4 KiB
Docker
Executable file

FROM rustlang/rust:nightly
RUN set -ex; \
apt-get update; \
apt-get install -q -y --no-install-recommends \
apt-transport-https \
bison \
flex \
fuse \
gosu \
libfuse-dev \
nasm \
qemu-utils \
sudo \
texinfo \
git \
; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F; \
echo "deb https://static.redox-os.org/toolchain/apt/ /" >> \
/etc/apt/sources.list.d/redox.list; \
apt-get update -o Dir::Etc::sourcelist="redox.list"; \
apt-get install -q -y --no-install-recommends \
x86-64-unknown-redox-newlib \
x86-64-unknown-redox-binutils \
x86-64-unknown-redox-gcc \
; \
cargo install xargo; \
cargo install cargo-config; \
apt-get autoremove -q -y; \
apt-get clean -q -y; \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/bin/bash"]