Skip to content

Commit

Permalink
Remove bindgen tool from build phase of Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Apr 24, 2023
1 parent 029f3f4 commit 8181fc4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 36 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ Currently supported docker platforms are:
- `ARTICHOKE_NIGHTLY_VER` - Argument used for cache invalidation (see
`Dockerfile`), defaults to SHA of latest trunk commit in upstream Artichoke
repository.
- `BINDGEN_PACKAGE` - Rust bindgen package (for cargo install).
- `BINDGEN_VERSION` - Rust bindgen version.

[artichoke-repo]: https://github.com/artichoke/artichoke
[docker-hub]: https://hub.docker.com/r/artichokeruby/artichoke
8 changes: 0 additions & 8 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
# https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# Install bindgen
ARG BINDGEN_PACKAGE=bindgen-cli
ARG BINDGEN_VERSION=0.65.1
RUN set -eux; \
rustup component add rustfmt; \
cargo install --version $BINDGEN_VERSION --locked $BINDGEN_PACKAGE; \
bindgen --version

ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand Down
13 changes: 0 additions & 13 deletions debian/bullseye/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
# https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# Install bindgen
ARG BINDGEN_PACKAGE=bindgen-cli
ARG BINDGEN_VERSION=0.65.1
RUN set -eux; \
rustup component add rustfmt; \
cargo install --version $BINDGEN_VERSION --locked $BINDGEN_PACKAGE; \
bindgen --version

ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand All @@ -85,11 +77,6 @@ ARG TARGETVARIANT
ARG ARTICHOKE_NIGHTLY_VER=latest
# Install artichoke
RUN set -eux; \
case "${TARGETARCH}" in \
amd64) artichokeArch='x86_64-unknown-linux-gnu' ;; \
arm64) artichokeArch='aarch64-unknown-linux-gnu'; export BINDGEN_EXTRA_CLANG_ARGS='--sysroot=/usr/aarch64-linux-gnu' ;; \
*) echo >&2 "unsupported architecture: ${TARGETARCH}"; exit 1 ;; \
esac; \
if [ "$ARTICHOKE_NIGHTLY_VER" = "latest" ]; then \
cargo install \
--target "$artichokeArch" \
Expand Down
13 changes: 0 additions & 13 deletions ubuntu/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
# https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# Install bindgen
ARG BINDGEN_PACKAGE=bindgen-cli
ARG BINDGEN_VERSION=0.65.1
RUN set -eux; \
rustup component add rustfmt; \
cargo install --version $BINDGEN_VERSION --locked $BINDGEN_PACKAGE; \
bindgen --version

ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
Expand All @@ -87,11 +79,6 @@ ARG TARGETVARIANT
ARG ARTICHOKE_NIGHTLY_VER=latest
# Install artichoke
RUN set -eux; \
case "${TARGETARCH}" in \
amd64) artichokeArch='x86_64-unknown-linux-gnu' ;; \
arm64) artichokeArch='aarch64-unknown-linux-gnu'; export BINDGEN_EXTRA_CLANG_ARGS='--sysroot=/usr/aarch64-linux-gnu' ;; \
*) echo >&2 "unsupported architecture: ${TARGETARCH}"; exit 1 ;; \
esac; \
if [ "$ARTICHOKE_NIGHTLY_VER" = "latest" ]; then \
cargo install \
--target "$artichokeArch" \
Expand Down

0 comments on commit 8181fc4

Please sign in to comment.