Update 'Dockerfile'

This commit is contained in:
lnkr 2022-05-05 11:39:54 +03:00
parent 6c2ab8d0a9
commit 96ba9905a8

View file

@ -1,18 +1,24 @@
# Refer to https://github.com/rust-lang/docker-rust-nightly/blob/master/debian-slim/Dockerfile
# Debian was the better choice and you're about to make a mistake
#ARG DEBIAN_VERSION #ARG DEBIAN_VERSION
#FROM debian:${DEBIAN_VERSION}-slim #FROM debian:${DEBIAN_VERSION}-slim
# - BASED? BASED ON WHAT?
# - based on Ubuntu 22.04 LTS «Jammy Jellyfish»
FROM ubuntu:jammy FROM ubuntu:jammy
# rust paths
ENV RUSTUP_HOME=/usr/local/rustup \ ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \ CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH PATH=/usr/local/cargo/bin:$PATH
RUN set -eux; \ RUN set -eux; \
apt update; \ apt update; \
apt install -y --no-install-recommends \ apt install -y --no-install-recommends \
ca-certificates \ ca-certificates gcc libc6-dev wget \
gcc \ ### https://github.com/emilk/eframe_template requirements
libc6-dev \ libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev
wget \
; \ ; \
dpkgArch="$(dpkg --print-architecture)"; \ dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \ case "${dpkgArch##*-}" in \
@ -24,7 +30,8 @@ RUN set -eux; \
url="https://static.rust-lang.org/rustup/dist/${rustArch}/rustup-init"; \ url="https://static.rust-lang.org/rustup/dist/${rustArch}/rustup-init"; \
wget "$url"; \ wget "$url"; \
chmod +x rustup-init; \ chmod +x rustup-init; \
./rustup-init -y --no-modify-path --default-toolchain nightly --target x86_64-pc-windows-gnu; \ ./rustup-init -y --no-modify-path --default-toolchain nightly \
--target x86_64-pc-windows-gnu; \
rm rustup-init; \ rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \ rustup --version; \
@ -32,6 +39,8 @@ RUN set -eux; \
rustc --version; \ rustc --version; \
\ \
apt remove -y --auto-remove \ apt remove -y --auto-remove \
### ditch the wget who needs that
wget \ wget \
; \ ; \
### wipe apt cache
rm -rf /var/lib/apt/lists/*; rm -rf /var/lib/apt/lists/*;