From 38c69a686457412d853cdccfd0af50f5212cb5d8 Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Thu, 15 Feb 2024 17:02:23 +0530 Subject: [PATCH 1/3] try a different fix --- .circleci/config.yml | 17 ++++++++++++++++- core/server/Dockerfile | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b7ce92e663..0c358d81ca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -418,7 +418,22 @@ jobs: version_to_publish="$(./scripts/get-docker-tag.sh)" image_name_with_version="${IMAGE_ORG_AND_REPO}:${version_to_publish}" echo "Version that will be persisted to workspace: ${version_to_publish}" - docker save -o << pipeline.parameters.core-server-image-filename >> "${image_name_with_version}" + docker save -o << pipeline.parameters.core-server-image-filename >> "${image_name_with_version}" + + - run: | + set -euo pipefail + source core/server/scripts/_constants.env + dockerfile_filepath='core/server/Dockerfile' + version_build="$(./scripts/get-docker-tag.sh)" + version_to_publish="$(cat version.txt)" + echo "Version that was built: ${version_build}" + echo "Version that will be published: ${version_to_publish}" + image_name_with_version="${IMAGE_ORG_AND_REPO}:${version_build}" + image_name_to_publish_semver="${IMAGE_ORG_AND_REPO}:${version_to_publish}" + image_name_to_publish_latest="${IMAGE_ORG_AND_REPO}:latest" + push_to_dockerhub=false + scripts/docker-image-builder.sh "${push_to_dockerhub}" "${dockerfile_filepath}" "${image_name_with_version}" "${image_name_to_publish_semver}" "${image_name_to_publish_latest}" + - save_cache: key: << pipeline.parameters.core-server-build-cache-key-prefix>>-{{ checksum "core/server/go.sum" }} diff --git a/core/server/Dockerfile b/core/server/Dockerfile index 83fa2599d1..31a9b1f382 100644 --- a/core/server/Dockerfile +++ b/core/server/Dockerfile @@ -5,7 +5,7 @@ RUN apk update && apk add --no-cache bash protobuf-dev sudo shadow curl xz # Install Nix # We need to set filter-syscalls to false to allow Nix to work properly inside a container: https://github.com/NixOS/nix/issues/5258 -ENV NIX_CONFIG=$'filter-syscalls = false\nexperimental-features = nix-command flakes' +ENV NIX_INSTALL_ARGS="--extra-conf 'filter-syscalls = false'" RUN sh <(curl -L https://nixos.org/nix/install) --daemon --yes ARG TARGETARCH From e06173015605eb7df0c9d7d34abb7949d8d5cfa6 Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Thu, 15 Feb 2024 17:19:20 +0530 Subject: [PATCH 2/3] update dockerfile.debug --- core/server/Dockerfile.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/Dockerfile.debug b/core/server/Dockerfile.debug index 0061f97af8..212f5d92f4 100644 --- a/core/server/Dockerfile.debug +++ b/core/server/Dockerfile.debug @@ -5,7 +5,7 @@ RUN apk update && apk add --no-cache bash protobuf-dev sudo shadow curl xz # Install Nix # We need to set filter-syscalls to false to allow Nix to work properly inside a container: https://github.com/NixOS/nix/issues/5258 -ENV NIX_CONFIG=$'filter-syscalls = false\nexperimental-features = nix-command flakes' +ENV NIX_INSTALL_ARGS="--extra-conf 'filter-syscalls = false'" RUN sh <(curl -L https://nixos.org/nix/install) --daemon --yes # Make sure that you changed the port inside the APIC's code before changing it here From 52b95758d7027af450dc7559de1fca9286565217 Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Thu, 15 Feb 2024 17:20:16 +0530 Subject: [PATCH 3/3] revert circle config --- .circleci/config.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c358d81ca..b7ce92e663 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -418,22 +418,7 @@ jobs: version_to_publish="$(./scripts/get-docker-tag.sh)" image_name_with_version="${IMAGE_ORG_AND_REPO}:${version_to_publish}" echo "Version that will be persisted to workspace: ${version_to_publish}" - docker save -o << pipeline.parameters.core-server-image-filename >> "${image_name_with_version}" - - - run: | - set -euo pipefail - source core/server/scripts/_constants.env - dockerfile_filepath='core/server/Dockerfile' - version_build="$(./scripts/get-docker-tag.sh)" - version_to_publish="$(cat version.txt)" - echo "Version that was built: ${version_build}" - echo "Version that will be published: ${version_to_publish}" - image_name_with_version="${IMAGE_ORG_AND_REPO}:${version_build}" - image_name_to_publish_semver="${IMAGE_ORG_AND_REPO}:${version_to_publish}" - image_name_to_publish_latest="${IMAGE_ORG_AND_REPO}:latest" - push_to_dockerhub=false - scripts/docker-image-builder.sh "${push_to_dockerhub}" "${dockerfile_filepath}" "${image_name_with_version}" "${image_name_to_publish_semver}" "${image_name_to_publish_latest}" - + docker save -o << pipeline.parameters.core-server-image-filename >> "${image_name_with_version}" - save_cache: key: << pipeline.parameters.core-server-build-cache-key-prefix>>-{{ checksum "core/server/go.sum" }}