Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker image for latest version of external libraries & tools #2374

Merged

Conversation

cngzhnp
Copy link
Contributor

@cngzhnp cngzhnp commented Jul 20, 2023

Devcontainer seems to old to catch up the latest versions of dependencies. So, I updated the libraries & tools if WASM environment requires for Docker image.

Impediments:

  • LLVM 16 could not be retrieved directly by using shell command that was provided before. So, I need to upgrade all tools manually but it is workaround and I just put LLVM issue URL as a comment in the script.

Improvements:

  • Use Debian 12 (Bookworm) as a base image instead of Ubuntu 20.04.
  • GCC9 upgraded to GCC12.
  • LLVM14 upgraded to LLVM16.
  • Clang10 upgraded to Clang10.
  • Binaryen111 upgraded to Binaryen114.
  • WASI-19 upgraded to WASI-20
  • WABT-1.0.29 upgraded to WABT-1.0.33
  • Bazelisk-1.12.0 upgraded to Bazelisk-1.17.0
  • GithubCLI-2.20.2 upgraded to GithubCLI-2.32.0
  • NodeJS-19.x upgraded to NodeJS-20.x
  • EMSDK-3.0.0 upgraded to EMSDK-3.1.43

Notes:
Python 2.7 was removed due to no support anymore and not found in the repository.

@cngzhnp cngzhnp force-pushed the fix/update_dev_container_docker_image branch from 3eb0260 to ba506bd Compare July 20, 2023 14:13
.devcontainer/Dockerfile Outdated Show resolved Hide resolved
.devcontainer/Dockerfile Show resolved Hide resolved
@cngzhnp cngzhnp force-pushed the fix/update_dev_container_docker_image branch from ba506bd to 97bd061 Compare July 23, 2023 12:45
@lum1n0us
Copy link
Collaborator

Please make sure to pass hadolint check.

@TianlongLiang
Copy link
Contributor

Hi, I run hadolint check on the Dockerfile for you, there are some warnings, you can check too by first pulling the docker image of hadolint, then running the check in the .devcontainer directory:

# pull docker images
docker pull hadolint/hadolint:latest
# hadolint check
git ls-files --exclude="*Dockerfile*" --cached --ignored | xargs -I filename zsh -c "echo filename; docker run --rm -i hadolint/hadolint:2.10.0 < filename; echo \"\n\""
# output
-:13 DL3009 info: Delete the apt-get lists after installing something
-:14 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:14 DL3027 warning: Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead
-:96 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:96 DL3027 warning: Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead
-:96 DL3015 info: Avoid additional packages by specifying `--no-install-recommends`

@cngzhnp
Copy link
Contributor Author

cngzhnp commented Jul 24, 2023

Hi, I run hadolint check on the Dockerfile for you, there are some warnings, you can check too by first pulling the docker image of hadolint, then running the check in the .devcontainer directory:

# pull docker images
docker pull hadolint/hadolint:latest
# hadolint check
git ls-files --exclude="*Dockerfile*" --cached --ignored | xargs -I filename zsh -c "echo filename; docker run --rm -i hadolint/hadolint:2.10.0 < filename; echo \"\n\""
# output
-:13 DL3009 info: Delete the apt-get lists after installing something
-:14 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:14 DL3027 warning: Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead
-:96 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:96 DL3027 warning: Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead
-:96 DL3015 info: Avoid additional packages by specifying `--no-install-recommends`

Hello @lum1n0us and @TianlongLiang, thanks for the output, I fixed Dockerfile linter warnings/infos. I may suggest that maybe it would be more helpful to run Hadolint check on Github actions when someone has changed one of Dockerfiles in the repository. Because I was not aware of that linter was run before changing anything on Dockerfile.

@TianlongLiang
Copy link
Contributor

Yes, a CI for hadolint linter to scan over Dockerfiles is definitely worth consideration, I will be working on it

@TianlongLiang
Copy link
Contributor

LGTM

@wenyongh wenyongh merged commit 1cafa37 into bytecodealliance:main Jul 24, 2023
1 check passed
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…ytecodealliance#2374)

Devcontainer is too old to catch up the latest versions of dependencies. This PR updates
the libraries & tools that WASM environment requires for Docker image.

**Impediments:**
- LLVM 16 can not be retrieved directly by using shell command as provided before.
So we upgrade all tools manually as a workaround and just put LLVM issue URL as a
comment in the script. 

**Improvements:**
- Use `Debian 12 (Bookworm)` as a base image instead of `Ubuntu 20.04`.
- `GCC9` upgraded to `GCC12`.
- `LLVM14` upgraded to `LLVM16`.
- `Clang10` upgraded to `Clang10`.
- `Binaryen111` upgraded to `Binaryen114`.
- `WASI-19` upgraded to `WASI-20`
- `WABT-1.0.29` upgraded to `WABT-1.0.33`
- `Bazelisk-1.12.0` upgraded to `Bazelisk-1.17.0`
- `GithubCLI-2.20.2` upgraded to `GithubCLI-2.32.0`
- `NodeJS-19.x` upgraded to `NodeJS-20.x`
- `EMSDK-3.0.0` upgraded to `EMSDK-3.1.43`

**Notes:**
`Python 2.7` is removed due to no support anymore and not found in the repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants