[JAVA] Install openjdk8 on Docker image (Debian)

I tried to put OpenJDK8 in a Docker image and it failed

I need to run the java build with the docker image I'm using to build the node. Since the base is Debian, google it appropriately and write as follows.

Dockerfile


FROM node:6-slim
RUN echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list && \
    apt-get update -y && \
    apt-get install -t jessie-backports openjdk-8-jdk -y

However, docker build gives an error. sad.

I also considered alpine, but I didn't have the packages I wanted to use, so I'd like to do something with Debian.

Solution

** mkdir -p / usr / share / man / man1 ** before putting openjdk.


FROM node:6-slim
RUN mkdir -p /usr/share/man/man1
    echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list && \
    apt-get update -y && \
    apt-get install -t jessie-backports openjdk-8-jdk -y

However, after packing various necessary packages, the size of the image became 1.4GB. Well, it's a docker image for development, and it should allow a heavy docker image killing man.

reference

"Errors installing OpenJDK due to unexistent man pages directory · Issue #273 · resin-io-library/base-images"

Recommended Posts

Install openjdk8 on Docker image (Debian)
Install OpenJDK on macOS
Install Docker on Manjaro
Install openjdk11 on mac
Install OpenJDK 8 on mac
Install Docker on Raspberry Pi
Install Docker on Windows 10 PRO
Install OpenJDK7 (JAVA) on ubuntu 14.04
Install Docker on Ubuntu Server 20.04
Install yarn in docker image
Install docker on AWS EC2
Install Docker on AWS Ubunt 20.04 LTS
Deploy Flask's Docker image on Heroku
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
How to install Adopt OpenJDK on Debian, Ubuntu with apt (-get)
Publish Docker Image on GitHub Package Registry
Install docker and docker-compose on Alpine Linux
Customize OpenFOAM v8 Docker Image on Mac
Install OpenJDK (Java) on the latest Ubuntu
Liberty on Docker
Redmine on Docker
Just install Laravel8 on docker in PHP8 environment
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Install Java 11 (OpenJDK: AdoptOpenJDK) on macOS with Homebrew
Install Java 14 (OpenJDK: AdoptOpenJDK) on macOS with Homebrew
Install Java 8 (OpenJDK: AdoptOpenJDK) on macOS with Homebrew
Update container image with KUSANAGI Runs on Docker
Install gradle on mac
Install Corretto 8 on Windows
Install Java on Mac
Docker installation on CentOS 6
Install Golang on CentOS 8
Install OpenJDK8 with RPM
Install pyqt5 on ubuntu
python notes on docker
Install Neo4j 4.1.3 on centOS
Install Java 8 (OpenJDK: Amazon Corretto) on macOS with Homebrew
Install Vertica 10.0 on CentOS 6.10
Install Ruby on Ubuntu 20.04
Install PostgreSQL 12 on Centos8
How to install Docker
Install nginx on centOS7
Install lombok on SpringToolSuite4
Delete unused docker image
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Java 8 (OpenJDK: Zulu Community) on macOS with Homebrew
Install Autoware on Ubuntu 18.04.5
OpenJDK installation on CentOS 7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Homebrew on Ubuntu 20.04
M.S. docker on Windows
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Docker installation on WSL2
Install Composer with Docker
Run phpunit on Docker
Until you run Quarkus and run docker image on Amazon ECS