Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

mcr.microsoft.com/vscode/devcontainers/java:{17|0-17|0-17-bullseye} does not contain java 17 but java 11 #1619

Closed
RyuSA opened this issue Sep 7, 2022 · 5 comments

Comments

@RyuSA
Copy link

RyuSA commented Sep 7, 2022

  • VSCode Version:
  • Local OS Version:
  • Local chip architecture: <x86, arm64, Apple Silicon>
$ code --version
1.71.0
784b0177c56c607789f9638da7b6bf3230d47a8c
x64

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

$ arch
x86_64
  • Reproduces in: Both
  • Name of Dev Container Definition with Issue: Java

Steps to Reproduce:

  1. docker run --rm -it mcr.microsoft.com/vscode/devcontainers/java:17 java -version

image

Bug summary

I found the Java base container images named mcr.microsoft.com/vscode/devcontainers/java:17 contains only JDK 11.

$ docker run --rm -it mcr.microsoft.com/vscode/devcontainers/java:0-17 bash
root ➜ / $ env | grep JAVA
JAVA_HOME=/usr/lib/jvm/msopenjdk-11
root ➜ / $ ls -al /usr/lib/jvm
total 12
drwxr-xr-x 3 root root 4096 Sep  1 23:05 .
drwxr-xr-x 1 root root 4096 Sep  1 23:05 ..
drwxr-xr-x 9 root root 4096 Sep  1 23:05 msopenjdk-11
root ➜ / $ /usr/lib/jvm/msopenjdk-11/bin/java -version
openjdk version "11.0.16.1" 2022-08-12 LTS
OpenJDK Runtime Environment Microsoft-40648 (build 11.0.16.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-40648 (build 11.0.16.1+1-LTS, mixed mode)

I didn't notifythe bug since I used local image cache long time for my devcontainer environment. But when I tried to rebuild the container image without cache, I got a build error today which said "hey, this container does not have java 17 but java 11".

I think the images must contain Java 17 to set up for Java 17 development environment. Isn't it expected behavier?

Thank you,

@RyuSA
Copy link
Author

RyuSA commented Sep 7, 2022

Quick workaround: use a semantic version tag. current latest version is 0.205.5
https://github.com/microsoft/vscode-dev-containers/blob/main/containers/java/history/0.205.5.md

$ docker run --rm -it mcr.microsoft.com/vscode/devcontainers/java:0.205.5-17 java -version
openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment Microsoft-38107 (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM Microsoft-38107 (build 17.0.4+8-LTS, mixed mode, sharing)

@eitsupi
Copy link
Contributor

eitsupi commented Sep 7, 2022

I think this issue is tracked on devcontainers/images#102

@RyuSA
Copy link
Author

RyuSA commented Sep 7, 2022

oh, I didn't know the issue thanks.

the change will be synced to this repo too?

@eitsupi
Copy link
Contributor

eitsupi commented Sep 7, 2022

the change will be synced to this repo too?

The source repository for that image has recently been changed from here to there.
Please see #1589.

@RyuSA
Copy link
Author

RyuSA commented Sep 7, 2022

Thanks a lot @eitsupi ! 👏 Let me close the issue.

@RyuSA RyuSA closed this as completed Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants