我正在嘗試撰寫一個 dockerfile 來運行一個 rust 測驗套件,該套件需要一個 jar 在單獨的埠上運行。我已將 jar 下載到專案中,并想從 openjdk docker 映像開始并下載 rust。這樣我就可以使用 java 命令運行 jar,然后使用 cargo 運行測驗。
# Start with java
FROM openjdk:latest
# Add rust
RUN <one line command to download rust>
# Install production dependencies and build a release artifact.
RUN cargo build --release
# Start chromedriver, geckodriver, and selenium standalone binary
RUN ./thirtyfour/tests/binaries_and_jars/chromedriver
RUN ./thirtyfour/tests/binaries_and_jars/geckodriver
RUN java -jar ./thirtyfour/tests/binaries_and_jars/selenium.jar standalone --port 1234
# Run the tests
RUN cargo test
我希望使用網站上提供的 curl 命令下載 rust,將所有選項作為 cli 引數傳遞,但我仍然得到提示。跑步
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable --default-host x86_64-unknown-linux-gnu --profile default
仍然會產生確認提示。
我對這里的任何解決方案持開放態度,包括
- 安裝 rust 的單行命令
- 從rust鏡像開始 一行命令安裝java。
uj5u.com熱心網友回復:
-y您可以通過添加引數來跳過確認提示。這可以在安裝程式腳本的幫助頁面中找到。
The installer for rustup
USAGE:
rustup-init [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
-y Disable confirmation prompt.
--no-modify-path Don't configure the PATH environment variable
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--default-host <default-host> Choose a default host triple
--default-toolchain <default-toolchain> Choose a default toolchain to install
--default-toolchain none Do not install any toolchains
--profile [minimal|default|complete] Choose a profile
-c, --component <components>... Component name to also install
-t, --target <targets>... Target name to also install
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/520979.html
標籤:爪哇码头工人硒测试锈
上一篇:前端測驗-按鈕禁用
