Skip to content

Instantly share code, notes, and snippets.

@phansch phansch/Dockerfile
Last active Oct 28, 2018

What would you like to do?
Trying to reproduce a 32bit Clippy crash
FROM i386/buildpack-deps:stretch
# The rustup installation code is taken from
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUN set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='0077ff9c19f722e2be202698c037413099e1188c0c233c12a2297bf18e9ff6e7' ;; \
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='f139e5be4ea2db7ff151c122f5d24af3c587c4fc74a7414e262cb34403278ad3' ;; \
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='c7d5471e71a315134e7499af75eb177d1f574858f1c6b8e61b436702d671a4e2' ;; \
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='909ce4e2d0c9bf60ba5a85426c38cceb5ae77979ab2b1e354e76b9851b5ec5ed' ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac; \
url="${rustArch}/rustup-init"; \
wget "$url"; \
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --default-host i686-unknown-linux-gnu --default-toolchain $RUST_VERSION; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \
rustc --version; \
cargo --version
RUN rustup component add clippy-preview
RUN cargo clippy --version
# Check if Clippy was compiled for x86 or x64
# See
RUN file `whereis cargo-clippy`
RUN git clone && \
cd utils/byte-tools && \
git checkout 12b85f9a7f1f59fe835cef2d22a5015f3df9fd18 && \
cargo clippy
Vagrant.configure("2") do |config| = "ubuntu/trusty32"
script = <<-SCRIPT
echo I am provisioning...
curl -sSf | sh -s -- -y --default-toolchain 1.29.2
source $HOME/.cargo/env
cargo --version
rustup --version
rustc --version
uname -a
rustup component add clippy-preview
cargo clippy --version
file `whereis cargo-clippy`
cat /proc/cpuinfo
sudo apt-get install git -y
git clone
cd utils/byte-tools
git checkout 11d4a91bebe889b10f57ab1d6c4dce2e3c0d5095
cargo clippy
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--longmode", "off"]
config.vm.provision "shell", inline: script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.