1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-23 08:26:17 +04:00
rCore/docker/Dockerfile
2018-04-02 15:28:32 +08:00

41 lines
976 B
Docker

FROM rustlang/rust:nightly
ENV IMAGE_NAME=blog_os-docker
RUN apt-get update && \
apt-get install -q -y --no-install-recommends \
nasm \
binutils \
grub-common \
xorriso \
grub-pc-bin && \
apt-get autoremove -q -y && \
apt-get clean -q -y && \
rm -rf /var/lib/apt/lists/* && \
cargo install xargo && \
rustup component add rust-src
ENV GOSU_VERSION 1.10
RUN set -ex; \
\
fetchDeps=' \
ca-certificates \
wget \
'; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
rm -rf /var/lib/apt/lists/*; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
chmod +x /usr/local/bin/gosu; \
# verify that the binary works
gosu nobody true;
COPY entrypoint.sh /usr/local/bin/
COPY .bash_aliases /etc/skel/
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/bin/bash"]