It looks like your upgrade from 16.04 to 18.04 didn’t finish properly, and it left your repository configuration mostly commented out. Output: => /etc/apt/sources.list /etc/apt//google-chrome.list /etc/apt// /etc/apt// /etc/apt//google.list /etc/apt// /etc/apt// /etc/apt//mono-official-preview.list /etc/apt// /etc/apt// /etc/apt//mono-official-stable.list /etc/apt// /etc/apt//mono-xamarin.list /etc/apt// /etc/apt// /etc/apt//mosquitto-dev-ubuntu-mosquitto-ppa-bionic.list /etc/apt// /etc/apt//notepadqq-team-ubuntu-notepadqq-xenial.list /etc/apt// /etc/apt// /etc/apt//skype-stable.list /etc/apt// /etc/apt// /etc/apt//teamviewer.list /etc/apt// /etc/apt//ubuntu-toolchain-r-ubuntu-test-xenial.list /etc/apt// /etc/apt// /etc/apt//webupd8team-ubuntu-java-bionic.list /etc/apt// <= Head -n -0 /etc/apt/sources.list /etc/apt//* Release v=18.04,o=XamarinBionic,a=stable-bionic,n=bionic,l=Xamarin-Stable-Bionic,c=main,b=amd64 Release v=18.04,o=XamarinBionic,a=stable-bionic,n=bionic,l=Xamarin-Stable-Bionic,c=main,b=i386 Release v=18.04,o=LP-PPA-mosquitto-dev-mosquitto-ppa,a=bionic,n=bionic,l=mosquitto,c=main,b=amd64 Release v=18.04,o=LP-PPA-mosquitto-dev-mosquitto-ppa,a=bionic,n=bionic,l=mosquitto,c=main,b=i386 I've tried apt-get update and also installing the other ones, but when I try openjdk ones, it says unable to locate package. This may mean that the package is missing, has been obsoleted, or is only available from another sourceĮ: Package 'default-jre' has no installation candidate Package default-jre is not available, but is referred to by another package. Sudo apt install openjdk-8-jre-headless (You will have to enable component called 'universe') mkdir -p /usr/share/man/man1 /usr/share/man/man2ĮDIT 1: Removed RUN export JAVA_HOME from the Dockerfile as its not required.I get Command 'java' not found, but can be installed with: This will create couple of directories in the container which is left out in slim variants to reduce the overall container size. In such scenarios simply include below line before installing java. #11 66.48 installed openjdk-11-jre-headless:amd64 package post-installation script subprocess returned error exit status 2 #11 66.48 dpkg: error processing package openjdk-11-jre-headless:amd64 (-configure): #11 66.48 update-alternatives: error: error creating symbolic link '/usr/share/man/man1/java.1.gz.dpkg-tmp': No such file or directory #11 66.48 update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode In Debian Slim based containers you might come across below error.Įrror creating symbolic link '/usr/share/man/man1/java.1.gz.dpkg-tmp': No such file or directory Setting up openjdk-11-jre-headless:amd64 (11.0.16+8-1~deb10u1). OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb10u1, mixed mode, sharing) OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb10u1) ĭocker run -d -name java-container java11Ĭheck the version in the container java -version RUN mkdir -p /usr/share/man/man1 /usr/share/man/man2 & \Īpt-get install -y -no-install-recommends openjdk-11-jre & \Īpt-get install ca-certificates-java -y & \ĮNV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/īuild the image, run and exec into the container. Here is how to install java 11 on any Debian/Debian slim based containers FROM python:3.7-slim-buster Which I run with make docker_image SUDO=sudo $(SUDO) docker save $(ARCHIVE_NAME) | gzip -c > docker rmi $(REPO_ARCHIVE_NAME) $(SUDO) docker tag -f $(ARCHIVE_NAME) $(REPO_ARCHIVE_NAME) REPO_ARCHIVE_NAME=$(DOCKER_REGISTRY)/$(ARCHIVE_NAME)īASE_IMAGE_ARCHIVE=$(DOCKER_IMAGE)_$(DOCKER_TAG).tar.gz bin/sh: 1: /usr/lib/jvm/java-7-openjdk-amd64: Permission deniedĮdit: per request in the comment here is my makefile: DOCKER_REGISTRY=ĪRCHIVE_NAME=$(DOCKER_IMAGE):$(DOCKER_TAG) When I run my makefile I get the following error: $/bin/jar -xvf somejar.jar &\īasically I'm only installing Java so I can expand a jar file. RUN apt-get install -y openjdk-7-jre & apt-get clean &\ RUN sed 's/main$/main universe/' -i /etc/apt/sources.list My Dockerfile looks roughly like this: FROM mybaseimage:0.1ĮNV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64 This is my very first try to create a Docker image and I'm hoping someone can help me out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |