-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (36 loc) · 1.76 KB
/
Dockerfile
File metadata and controls
43 lines (36 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# while using circle we'll use circle's base image.
FROM archlinux:base-devel-20230122.0.120412@sha256:bbb85acb5aad5bdd67916c8311409b1836c422cb93534f4baa286fd70f76cc80 AS setup_ci_arch
WORKDIR /diem
COPY rust-toolchain /diem/rust-toolchain
COPY cargo-toolchain /diem/cargo-toolchain
COPY scripts/dev_setup.sh /diem/scripts/dev_setup.sh
# WORKAROUND for glibc 2.33 and old Docker
# See https://github.com/actions/virtual-environments/issues/2658
# Thanks to https://github.com/lxqt/lxqt-panel/pull/1562
RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && \
curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && \
bsdtar -C / -xvf "$patched_glibc"
# Batch mode and all operations tooling
RUN scripts/dev_setup.sh -t -o -y -b -p && pacman -Scc --noconfirm
ENV PATH "/root/.cargo/bin:/root/bin/:$PATH"
FROM setup_ci_arch as tested_ci_arch
# Compile a small rust tool? But we already have in dev_setup (sccache/grcov)...?
# Test that all commands we need are installed and on the PATH
RUN [ -x "$(command -v shellcheck)" ] \
&& [ -x "$(command -v hadolint)" ] \
&& [ -x "$(command -v vault)" ] \
&& [ -x "$(command -v terraform)" ] \
&& [ -x "$(command -v kubectl)" ] \
&& [ -x "$(command -v rustup)" ] \
&& [ -x "$(command -v cargo)" ] \
&& [ -x "$(command -v sccache)" ] \
&& [ -x "$(command -v grcov)" ] \
&& [ -x "$(command -v helm)" ] \
&& [ -x "$(command -v aws)" ] \
&& [ -x "$(command -v z3)" ] \
&& [ -x "$(command -v "$HOME/.dotnet/tools/boogie")" ] \
&& [ -x "$(xargs rustup which cargo --toolchain < /diem/rust-toolchain )" ] \
&& [ -x "$(xargs rustup which cargo --toolchain < /diem/cargo-toolchain)" ]
# should be a no-op
RUN scripts/dev_setup.sh -b -p
FROM setup_ci_arch as build_environment_arch