mkdir -p /usr/share/man/man1 /usr/share/man/man2ĮDIT 1: Removed RUN export JAVA_HOME from the Dockerfile as its not required. 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. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java TM platform. #11 66.48 installed openjdk-11-jre-headless:amd64 package post-installation script subprocess returned error exit status 2 The JDK is a development environment for building applications using the Java programming language. #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 Select the version to install, the higher the number after b, the more recent is the version. Start the IDE, use Help Find Action (Ctrl+Shift+A or Cmd+Shift+A on Mac), type 'Choose Boot Java Runtime for the IDE', press Enter. 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). All platforms: download and install JetBrains Runtime via Choose Boot Java Runtime for the IDE action. 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 |