Skip to content

Commit

Permalink
make docker builds work outside of macos (MystenLabs#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
tharbert authored Jun 21, 2022
1 parent 99543bd commit 15703a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docker/sui-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y cmake clang
# 3. Update the lockfile in order to reflect the changes to the
# root Cargo.toml file.
FROM chef AS planner
COPY Cargo.toml Cargo.lock .
COPY Cargo.toml Cargo.lock ./
COPY crates/workspace-hack crates/workspace-hack
RUN sed -i '/crates\/workspace-hack/b; /crates/d' Cargo.toml \
&& cargo metadata -q >/dev/null
Expand All @@ -32,7 +32,7 @@ RUN cargo build --release
# Copy in the rest of the crates (and an unmodified Cargo.toml and Cargo.lock)
# and build the application. At this point no dependencies should need to be
# built as they were built and cached by the previous layer.
COPY Cargo.toml Cargo.lock .
COPY Cargo.toml Cargo.lock ./
COPY crates crates
RUN cargo build --release --bin sui-node

Expand Down
2 changes: 1 addition & 1 deletion docker/sui-node/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

# fast fail.
set -eo pipefail
set -e

DIR="$( cd "$( dirname "$0" )" && pwd )"
REPO_ROOT="$(git rev-parse --show-toplevel)"
Expand Down
4 changes: 2 additions & 2 deletions docker/sui-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y cmake clang
# 3. Update the lockfile in order to reflect the changes to the
# root Cargo.toml file.
FROM chef AS planner
COPY Cargo.toml Cargo.lock .
COPY Cargo.toml Cargo.lock ./
COPY crates/workspace-hack crates/workspace-hack
RUN sed -i '/crates\/workspace-hack/b; /crates/d' Cargo.toml \
&& cargo metadata -q >/dev/null
Expand All @@ -32,7 +32,7 @@ RUN cargo build --release
# Copy in the rest of the crates (and an unmodified Cargo.toml and Cargo.lock)
# and build the application. At this point no dependencies should need to be
# built as they were built and cached by the previous layer.
COPY Cargo.toml Cargo.lock .
COPY Cargo.toml Cargo.lock ./
COPY crates crates
RUN cargo build --release \
--bin sui-node \
Expand Down
2 changes: 1 addition & 1 deletion docker/sui-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

# fast fail.
set -eo pipefail
set -e

DIR="$( cd "$( dirname "$0" )" && pwd )"
REPO_ROOT="$(git rev-parse --show-toplevel)"
Expand Down

0 comments on commit 15703a0

Please sign in to comment.