Advice on setting up a hybrid Java and Python devcontainer
See original GitHub issueI want to setup a devcontainers environment for a Django Python project. I was curious about using the SonarLint extension.
SonarLint
has a dependency on the JRE11+ being installed.
What is the best approach to take in setting up a devcontainer for this type of project?
What am I trying?
At the minute I am unsuccessfully trying to look at the following folders to try and set my own Dockerfile and devcontainer.json up.
https://github.com/devcontainers/images/tree/main/src/java https://github.com/devcontainers/images/tree/main/src/python
This uses the mcr.microsoft.com/devcontainers/base:bullseye
. My thoughts were to copy the Dockerfile instructions as per the Java Dockerfile then trying to install Python 3.11 separately.
RUN arch="$(dpkg --print-architecture)" \
...
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends python3.11 python3-pip
Which yields the following problems in the log file:
#0 5.837 E: Couldn't find any package by glob 'python3.11'
#0 5.837 E: Couldn't find any package by regex 'python3.11'
I’ve attached by feeble attempt at this for the devcontainer.json and docker file.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Wow… So it does work 😃 Thanks a lot
Hi @andez2000 👋
Could you try with this Dev Container config 👇 ?