diff --git a/dockerfiles/csci4510/metadata.json b/dockerfiles/csci4510/metadata.json index 99c1ffc..fabc11c 100644 --- a/dockerfiles/csci4510/metadata.json +++ b/dockerfiles/csci4510/metadata.json @@ -1,3 +1,4 @@ { - "pushLatest": false + "pushLatest": true + "latestTag": "spring26" } diff --git a/dockerfiles/csci4510/spring26/Dockerfile b/dockerfiles/csci4510/spring26/Dockerfile new file mode 100644 index 0000000..0ca1f34 --- /dev/null +++ b/dockerfiles/csci4510/spring26/Dockerfile @@ -0,0 +1,227 @@ +FROM ubuntu:22.04 + +ARG TARGETPLATFORM + +RUN apt-get update \ + && apt-get -y --no-install-recommends install \ + grep \ + libseccomp-dev \ + libseccomp2 \ + procps \ + && rm -rf /var/lib/apt/lists/* +# +# Source: https://github.com/docker-library/python/blob/master/3.6/stretch/slim/Dockerfile +# + +# ensure local python is preferred over distribution python +ENV PATH=/usr/local/bin:$PATH + +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG=C.UTF-8 + +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + netbase \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY=A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.1 + +RUN set -ex \ + \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + dpkg-dev \ + gcc \ + libbz2-dev \ + libc6-dev \ + libexpat1-dev \ + libffi-dev \ + libgdbm-dev \ + liblzma-dev \ + libncursesw5-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + make \ + tk-dev \ + wget \ + xz-utils \ + zlib1g-dev \ +# as of Stretch, "gpg" is no longer included by default + $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \ + && rm -rf "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + && make install \ + && ldconfig \ + \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' + \ + && rm -rf /usr/src/python \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION=23.3.2 + +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends wget; \ + \ + wget -O get-pip.py 'https://bootstrap.pypa.io/pip/get-pip.py'; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py; \ + pip3 install aioconsole; \ + pip3 uninstall --yes pip setuptools + +# Necessary as Submitty does path expansion of commands in compiling a homework, +# and so resolves "python" -> "/usr/bin/python" +RUN cd /usr/bin \ + && ln -s /usr/local/bin/python3 python3 \ + && ln -s /usr/local/bin/python3 python \ + && ln -s /usr/local/bin/pip3 pip3 \ + && ln -s /usr/local/bin/pip3 pip + + +# Install Java 21 +RUN apt-get update \ + && apt-get -y --no-install-recommends install openjdk-21-jdk \ + && rm -rf /var/lib/apt/lists/* + + +# # Go install + + +ENV GO_VERSION=1.25.5 + +RUN apt-get update && apt-get install -y \ + ca-certificates \ + wget \ + tar \ + && rm -rf /var/lib/apt/lists/* + +RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \ + && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \ + && rm go${GO_VERSION}.linux-amd64.tar.gz + +ENV GOPATH=/go +ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH + + +## Rust install + + +ENV RUSTUP_HOME=/usr/local/rustup \ + CARGO_HOME=/usr/local/cargo \ + PATH=/usr/local/cargo/bin:$PATH \ + RUST_VERSION=1.92.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' ;; \ + armhf) rustArch='armv7-unknown-linux-gnueabihf' ;; \ + arm64) rustArch='aarch64-unknown-linux-gnu' ;; \ + i386) rustArch='i686-unknown-linux-gnu' ;; \ + *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ + esac; \ + url="https://static.rust-lang.org/rustup/dist/${rustArch}/rustup-init"; \ + wget -O rustup-init "$url"; \ + 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"' >> /dockerdeps/Cargo.toml \ + && echo 'serde = { version = "=1.0", features = ["derive"] }' >> /dockerdeps/Cargo.toml \ + && cd dockerdeps \ + && cargo fetch \ + && cd .. && \ + rm -rf dockerdeps + + + +CMD ["/bin/bash"]