diff --git a/dockerfiles/csci4510/spring24/Dockerfile b/dockerfiles/csci4510/spring24/Dockerfile index e084af7..e6897d8 100644 --- a/dockerfiles/csci4510/spring24/Dockerfile +++ b/dockerfiles/csci4510/spring24/Dockerfile @@ -270,39 +270,47 @@ ENV GOPATH /go ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -# ENV RUSTUP_HOME=/usr/local/rustup \ -# CARGO_HOME=/usr/local/cargo \ -# PATH=/usr/local/cargo/bin:$PATH \ -# RUST_VERSION=1.46.0 +ENV RUSTUP_HOME=/usr/local/rustup \ + CARGO_HOME=/usr/local/cargo \ + PATH=/usr/local/cargo/bin:$PATH \ + RUST_VERSION=1.75.0 + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + gcc \ + libc6-dev \ + wget \ + ; \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "${dpkgArch##*-}" in \ + amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ + armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='f21c44b01678c645d8fbba1e55e4180a01ac5af2d38bcbd14aa665e0d96ed69a' ;; \ + arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ + i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='e7b0f47557c1afcd86939b118cbcf7fb95a5d1d917bdd355157b63ca00fc4333' ;; \ + *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ + esac; \ + url="https://static.rust-lang.org/rustup/archive/1.26.0/${rustArch}/rustup-init"; \ + wget "$url"; \ + echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ + chmod +x rustup-init; \ + ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \ + rm rustup-init; \ + chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ + rustup --version; \ + cargo --version; \ + rustc --version; \ + apt-get remove -y --auto-remove \ + wget \ + ; \ + rm -rf /var/lib/apt/lists/*; + +RUN cargo new dockerdeps \ + && echo 'serde_json = "1.0.111"' >> /dockerdeps/Cargo.toml \ + && cd dockerdeps \ + && cargo build \ + && cd .. && \ + rm -rf dockerdeps -# RUN set -eux; \ -# apt-get update; \ -# apt-get install -y --no-install-recommends \ -# ca-certificates \ -# gcc \ -# libc6-dev \ -# wget \ -# ; \ -# dpkgArch="$(dpkg --print-architecture)"; \ -# case "${dpkgArch##*-}" in \ -# amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='ad1f8b5199b3b9e231472ed7aa08d2e5d1d539198a15c5b1e53c746aad81d27b' ;; \ -# armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='6c6c3789dabf12171c7f500e06d21d8004b5318a5083df8b0b02c0e5ef1d017b' ;; \ -# arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='26942c80234bac34b3c1352abbd9187d3e23b43dae3cf56a9f9c1ea8ee53076d' ;; \ -# i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='27ae12bc294a34e566579deba3e066245d09b8871dc021ef45fc715dced05297' ;; \ -# *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ -# esac; \ -# url="https://static.rust-lang.org/rustup/archive/1.21.1/${rustArch}/rustup-init"; \ -# wget "$url"; \ -# echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ -# chmod +x rustup-init; \ -# ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \ -# rm rustup-init; \ -# chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ -# rustup --version; \ -# cargo --version; \ -# rustc --version; \ -# apt-get remove -y --auto-remove \ -# wget \ -# ; \ -# rm -rf /var/lib/apt/lists/*; CMD ["/bin/bash"]