Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #758 from helium/madninja/rustup_docker
Browse files Browse the repository at this point in the history
Attempt rustup docker
  • Loading branch information
evanmcc authored May 6, 2021
2 parents 74993a1 + 0d1bb5f commit 98a6030
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .buildkite/scripts/Dockerfile-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ FROM erlang:22.3.2-alpine as builder
RUN apk add --no-cache --update \
git tar build-base linux-headers autoconf automake libtool pkgconfig \
dbus-dev bzip2 bison flex gmp-dev cmake lz4 libsodium-dev openssl-dev \
sed wget rust cargo
sed wget curl

# Install Rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

WORKDIR /usr/src/miner

ENV CC=gcc CXX=g++ CFLAGS="-U__sun__" \
ERLANG_ROCKSDB_OPTS="-DWITH_BUNDLE_SNAPPY=ON -DWITH_BUNDLE_LZ4=ON" \
ERL_COMPILER_OPTIONS="[deterministic]"
ERL_COMPILER_OPTIONS="[deterministic]" \
PATH="/root/.cargo/bin:$PATH" \
RUSTFLAGS="-C target-feature=-crt-static"

# Add our code
ADD . /usr/src/miner/

RUN ./rebar3 as docker tar

RUN mkdir -p /opt/docker
RUN tar -zxvf _build/docker/rel/*/*.tar.gz -C /opt/docker
RUN mkdir -p /opt/docker/update
Expand Down
10 changes: 8 additions & 2 deletions .buildkite/scripts/Dockerfile-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ FROM arm64v8/erlang:22.3.2-alpine as builder
RUN apk add --no-cache --update \
git tar build-base linux-headers autoconf automake libtool pkgconfig \
dbus-dev bzip2 bison flex gmp-dev cmake lz4 libsodium-dev openssl-dev \
sed wget rust cargo
sed wget curl

# Install Rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

WORKDIR /usr/src/miner

ENV CC=gcc CXX=g++ CFLAGS="-U__sun__" \
ERLANG_ROCKSDB_OPTS="-DWITH_BUNDLE_SNAPPY=ON -DWITH_BUNDLE_LZ4=ON" \
ERL_COMPILER_OPTIONS="[deterministic]"
ERL_COMPILER_OPTIONS="[deterministic]" \
PATH="/root/.cargo/bin:$PATH" \
RUSTFLAGS="-C target-feature=-crt-static"

# Add our code
ADD . /usr/src/miner/

RUN ./rebar3 as docker tar

RUN mkdir -p /opt/docker
RUN tar -zxvf _build/docker/rel/*/*.tar.gz -C /opt/docker
RUN mkdir -p /opt/docker/update
Expand Down

0 comments on commit 98a6030

Please sign in to comment.