Skip to content

Commit ec65e62

Browse files
committed
Make release the default mode for Dockerfile
1 parent 12424da commit ec65e62

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.github/workflows/docker_image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
5050
- name: Build Docker image
5151
run: |
52-
docker build --build-arg git_commit=${{ env.GIT_COMMIT_LONG }} --build-arg build_flag="--release" --build-arg build_folder="release" \
52+
docker build --build-arg git_commit=${{ env.GIT_COMMIT_LONG }} \
5353
-f docker/Dockerfile . \
5454
-t ${{ env.DOCKER_IMAGE }}:${{ env.BRANCH_NAME }} \
5555
-t ${{ env.DOCKER_IMAGE }}:${{ env.GIT_COMMIT_SHORT }} \

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ ARG build_date
2222
ARG target=x86_64-unknown-linux-gnu
2323
ARG binaries=
2424
ARG copy=${binaries:+_copy}
25-
ARG build_flag=
26-
ARG build_folder=
25+
ARG build_flag=--release
26+
ARG build_folder=release
2727

2828
FROM rust:1.74-slim-bookworm AS builder
2929
ARG git_commit

docker/compose.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ cd "$ROOT_DIR"
3737
GIT_COMMIT=$(git rev-parse --short HEAD)
3838

3939
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
40-
docker build --build-arg git_commit="$GIT_COMMIT" --build-arg build_flag="--release" --build-arg build_folder="release" -f docker/Dockerfile . -t linera || exit 1
40+
docker build --build-arg git_commit="$GIT_COMMIT" -f docker/Dockerfile . -t linera || exit 1
4141
elif [[ "$OSTYPE" == "darwin"* ]]; then
4242
CPU_ARCH=$(sysctl -n machdep.cpu.brand_string)
4343
if [[ "$CPU_ARCH" == *"Apple"* ]]; then
44-
docker build --build-arg git_commit="$GIT_COMMIT" --build-arg target=aarch64-unknown-linux-gnu --build-arg build_flag="--release" --build-arg build_folder="release" -f docker/Dockerfile -t linera . || exit 1
44+
docker build --build-arg git_commit="$GIT_COMMIT" --build-arg target=aarch64-unknown-linux-gnu -f docker/Dockerfile -t linera . || exit 1
4545
else
4646
echo "Unsupported Architecture: $CPU_ARCH"
4747
exit 1

linera-service/src/cli_wrappers/docker.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ impl DockerImage {
6565
.args(["--build-arg", &build_arg]);
6666

6767
match build_mode {
68-
BuildMode::Release => {
69-
command.args(["--build-arg", "build_flag=--release"]);
70-
command.args(["--build-arg", "build_folder=release"]);
71-
}
68+
// Release is the default, so no need to add any arguments
69+
BuildMode::Release => {}
7270
BuildMode::Debug => {
7371
command.args(["--build-arg", "build_folder=debug"]);
72+
command.args(["--build-arg", "build_flag="]);
7473
}
7574
}
7675

scripts/deploy-validator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ GENESIS_CONFIG="docker/genesis.json"
5454

5555
if [ -z "$REMOTE_IMAGE" ]; then
5656
echo "Building local image from commit $GIT_COMMIT..."
57-
docker build --build-arg git_commit="$GIT_COMMIT" --build-arg build_flag="--release" --build-arg build_folder="release" -f docker/Dockerfile . -t linera
57+
docker build --build-arg git_commit="$GIT_COMMIT" -f docker/Dockerfile . -t linera
5858
export LINERA_IMAGE=linera
5959
else
6060
export LINERA_IMAGE="us-docker.pkg.dev/linera-io-dev/linera-public-registry/linera:${BRANCH_NAME}_release"

0 commit comments

Comments
 (0)