Skip to content

Commit

Permalink
Use a Slim Base Image for our Cross-Build Toolchain Docker Image (#8425)
Browse files Browse the repository at this point in the history
* change it to slim

* update

* Ran regenerate.sh

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
  • Loading branch information
nisdas and prestonvanloon authored Feb 11, 2021
1 parent b6a4009 commit ed9c69e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tools/cross-toolchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# docker build -t gcr.io/prysmaticlabs/rbe-worker:latest .
# gcloud docker -- push gcr.io/prysmaticlabs/rbe-worker:latest

FROM debian:buster as build
FROM debian:buster-slim as build

# install gnu/gcc cross-build toolchain (gcc 8.3)
ENV DOCKER_CLI_EXPERIMENTAL=enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2113,7 +2113,6 @@ module "crosstool" [system] {
textual header "/usr/include/iconv.h"
textual header "/usr/include/ifaddrs.h"
textual header "/usr/include/inttypes.h"
textual header "/usr/include/iproute2/bpf_elf.h"
textual header "/usr/include/langinfo.h"
textual header "/usr/include/lastlog.h"
textual header "/usr/include/libgen.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ platform(
"@bazel_tools//tools/cpp:clang",
],
exec_properties = {
"container-image": "docker://gcr.io/prysmaticlabs/rbe-worker@sha256:d5fa14154811dff0886e4c808dc15f18c4bb8545a1ef3c53805a0db13564bdad",
"container-image": "docker://gcr.io/prysmaticlabs/rbe-worker@sha256:bd40e9a43b983c8b06079d14a0530100d6e1d59796616ca1d8b3902a197c97b1",
"OSFamily": "Linux",
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ cc_toolchain(
name = "cc-mingw-amd64",
all_files = ":empty",
ar_files = ":empty",
as_files = ":mingw_compiler_files",
compiler_files = ":mingw_compiler_files",
as_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def _impl(ctx):
action_configs = []

install = "/usr/x86_64-w64-mingw32/"
gcc_libpath = "/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/"
bin_prefix = "/usr/bin/x86_64-w64-mingw32-"


Expand Down Expand Up @@ -158,7 +159,10 @@ def _impl(ctx):
]

cxx_builtin_include_directories = [
install +"include"
install +"include",
gcc_libpath +"include",
gcc_libpath +"include-fixed",
"/usr/share/mingw-w64/include/"
]

artifact_name_patterns = [
Expand Down
4 changes: 2 additions & 2 deletions tools/cross-toolchain/configs/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
toolchain_config_spec0 = struct(config_repos = ["prysm_toolchains"], create_cc_configs = True, create_java_configs = True, env = {"BAZEL_COMPILER": "clang", "BAZEL_LINKLIBS": "-l%:libstdc++.a", "BAZEL_LINKOPTS": "-lm:-static-libgcc", "BAZEL_USE_LLVM_NATIVE_COVERAGE": "1", "GCOV": "llvm-profdata", "CC": "clang", "CXX": "clang++"}, java_home = "/usr/lib/jvm/java-8-openjdk-amd64", name = "clang")
_TOOLCHAIN_CONFIG_SPECS = [toolchain_config_spec0]
_BAZEL_TO_CONFIG_SPEC_NAMES = {"3.7.0": ["clang"]}
LATEST = "sha256:d5fa14154811dff0886e4c808dc15f18c4bb8545a1ef3c53805a0db13564bdad"
CONTAINER_TO_CONFIG_SPEC_NAMES = {"sha256:d5fa14154811dff0886e4c808dc15f18c4bb8545a1ef3c53805a0db13564bdad": ["clang"]}
LATEST = "sha256:bd40e9a43b983c8b06079d14a0530100d6e1d59796616ca1d8b3902a197c97b1"
CONTAINER_TO_CONFIG_SPEC_NAMES = {"sha256:bd40e9a43b983c8b06079d14a0530100d6e1d59796616ca1d8b3902a197c97b1": ["clang"]}
_DEFAULT_TOOLCHAIN_CONFIG_SPEC = toolchain_config_spec0
TOOLCHAIN_CONFIG_AUTOGEN_SPEC = struct(
bazel_to_config_spec_names_map = _BAZEL_TO_CONFIG_SPEC_NAMES,
Expand Down
2 changes: 1 addition & 1 deletion tools/cross-toolchain/rbe_toolchains_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@prysm//tools/cross-toolchain:configs/versions.bzl", _generated_toolchain_

_PRYSM_BUILD_IMAGE_REGISTRY = "gcr.io"
_PRYSM_BUILD_IMAGE_REPOSITORY = "prysmaticlabs/rbe-worker"
_PRYSM_BUILD_IMAGE_DIGEST = "sha256:d5fa14154811dff0886e4c808dc15f18c4bb8545a1ef3c53805a0db13564bdad"
_PRYSM_BUILD_IMAGE_DIGEST = "sha256:bd40e9a43b983c8b06079d14a0530100d6e1d59796616ca1d8b3902a197c97b1"
_PRYSM_BUILD_IMAGE_JAVA_HOME = "/usr/lib/jvm/java-8-openjdk-amd64"
_CONFIGS_OUTPUT_BASE = "tools/cross-toolchain/configs"

Expand Down

0 comments on commit ed9c69e

Please sign in to comment.