1

my boss gave me a docker environment on azure. i need to use java but my azure environment does not have it. so i requested my boss to change the azure environemnt to another one which is available for java. but my boss said that its impossible. so that i need to install java to the current environment.

i tried to install java by adding the following statement to my docker file.

RUN apt-get update -y \ && apt-get install -y default-jdk 

but the following errors have been shown.

The command '/bin/sh -c apt-get update -y && apt-get install -y default-jdk' returned a non-zero code: 100 ##[error]The command '/bin/sh -c apt-get update -y && apt-get install -y default-jdk' returned a non-zero code: 100 ##[error]The process '/usr/bin/docker' failed with exit code 100 Finishing: Build and push an image to container registry 

my source.list is the following:

deb http://deb.debian.org/debian buster main

deb http://security.debian.org/debian-security buster/updates main

deb http://deb.debian.org/debian buster-updates main

how can i resolve the problem?


oh no, i fixed it myselef by adding the following scripts to my docker file.

RUN apt-get -y update RUN apt-get -y install apt-utils RUN mkdir -p /usr/share/man/man1 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install openjdk-11-jdk-headless 
2
  • 3
    There's no such thing as a "docker environment on azure" or "azure environment". Do you mean "virtual machine"? Commented Nov 9, 2021 at 10:29
  • hi i fixed it myself by adding the following scripts to my docker file:RUN apt-get -y update RUN apt-get -y install apt-utils RUN mkdir -p /usr/share/man/man1 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install openjdk-11-jdk-headless Commented Nov 10, 2021 at 9:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.