Question
· Nov 5, 2022

Docker image/container - use aptitude

Hi,
The IRIS Health Docker image comes with Java 1.8 but I need OpenJDK 11. How could I install that using aptitude or somehow else?
The apt-get command requires elevation but if I rewrite the command with sudo apt-get it won't build with error message /bin/sh: sudo: not found
Is it possible to do what I want?

Product version: IRIS 2022.1
$ZV: 2022.1.1.374.0
Discussion (3)1
Log in or sign up to continue

In your docker build try this sequence:

USER root
RUN apt-get clean -yq && apt-get update -yq && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openjdk-11-jdk
USER ${ISC_PACKAGE_MGRUSER}


Or install sudo (very bad practice in containers):

USER root
RUN apt-get clean -yq && apt-get update -yq && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl gnupg ca-certificates sudo
RUN /bin/echo -e ${ISC_PACKAGE_MGRUSER}\\tALL=\(ALL\)\\tNOPASSWD: ALL >> /etc/sudoers
RUN sudo -u ${ISC_PACKAGE_MGRUSER} sudo echo enabled passwordless sudo-ing for ${ISC_PACKAGE_MGRUSER}
USER ${ISC_PACKAGE_MGRUSER}