Skip to content

Commit cb961ee

Browse files
authored
Merge pull request #3027 from fzyzcjy/publish_docker_0315
Fix dev Docker image nightly smoke test
2 parents b1923fd + 07a5864 commit cb961ee

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,35 @@ SHELL ["/bin/bash", "-c"]
2929
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_VERSION} && \
3030
export PATH="$HOME/.cargo/bin:$PATH" && \
3131
rustup component add rustfmt clippy && \
32-
rustup toolchain install nightly-${RUST_NIGHTLY_VERSION} && \
33-
rustup component add rust-src --toolchain nightly-${RUST_NIGHTLY_VERSION} && \
34-
rustup target add wasm32-unknown-unknown --toolchain nightly-${RUST_NIGHTLY_VERSION}
32+
rustup toolchain install "nightly-${RUST_NIGHTLY_VERSION}" && \
33+
rustup component add rust-src --toolchain "nightly-${RUST_NIGHTLY_VERSION}" && \
34+
rustup target add wasm32-unknown-unknown --toolchain "nightly-${RUST_NIGHTLY_VERSION}"
3535
ENV PATH="/root/.cargo/bin:${PATH}"
3636

3737
# Install wasm-pack for web tests
3838
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
3939

4040
# Install Chrome for web tests (headless testing)
4141
RUN apt-get update && apt-get install -y \
42-
chromium \
43-
chromium-driver \
42+
wget \
43+
gnupg \
44+
&& wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg && \
45+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
46+
apt-get update && apt-get install -y \
47+
google-chrome-stable \
4448
&& rm -rf /var/lib/apt/lists/*
45-
ENV CHROME_BIN=/usr/bin/chromium
49+
ENV CHROME_BIN=/usr/bin/google-chrome
4650

4751
# Working directory
4852
WORKDIR /workspace
4953

5054
RUN flutter --version && \
5155
dart --version && \
5256
cargo --version && \
53-
rustup toolchain list | grep nightly-${RUST_NIGHTLY_VERSION} && \
54-
rustup target list --installed | grep wasm32-unknown-unknown && \
57+
rustup toolchain list | grep "nightly-${RUST_NIGHTLY_VERSION}" && \
58+
rustup target list --toolchain "nightly-${RUST_NIGHTLY_VERSION}" --installed | grep wasm32-unknown-unknown && \
5559
wasm-pack --version && \
56-
chromium --version
60+
"${CHROME_BIN}" --version
5761

5862
# Default command
5963
CMD ["bash"]

.github/workflows/publish_dev_docker.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ jobs:
8282
dart --version
8383
cargo --version
8484
rustup show
85-
rustup target list --installed
85+
rustup target list --toolchain nightly-${{ steps.metadata.outputs.rust_nightly_version }} --installed
8686
wasm-pack --version
87-
chromium --version
88-
rustup target list --installed | grep wasm32-unknown-unknown
87+
"${CHROME_BIN}" --version
88+
rustup target list --toolchain nightly-${{ steps.metadata.outputs.rust_nightly_version }} --installed | grep wasm32-unknown-unknown
8989
rustup show | grep "nightly-${{ steps.metadata.outputs.rust_nightly_version }}"
9090
'
9191

0 commit comments

Comments
 (0)