- Openjdk 7 centos dockerfile how to#
- Openjdk 7 centos dockerfile apk#
- Openjdk 7 centos dockerfile update#
- Openjdk 7 centos dockerfile upgrade#
Where can I find it? Find it on : centos. It is a script composed of a series of commands and parameters Three steps of Construction:Ĭentos case: FROM scratch #True basic image, I hope I can help you!!! 1, What is Dockerfile? Concept:ĭockerfile is a build file used to build Docker images. I was a little unfamiliar with the writing of Dockerfile files. At that time, it was to quickly deploy a project. So, based on pajamas's anwser I decided to convert his image from Alpine to Centos which worked very well.I learned Docker briefly before. I searched and tried this, this and that but none worked for me.
Openjdk 7 centos dockerfile how to#
However, when trying to install packages like gensim, pandas or else, I faced some errors like: don't know how to compile Fortran code on platform 'posix'. I tried pajamas's anwser which worked very well for creating this image. I used them to answer this question, which may help you sometime. usr/ local/bin/slim-java.sh /opt/java/openjdk \ĮNV JAVA_TOOL_OPTIONS= "-XX:+UseContainerSupport"
Openjdk 7 centos dockerfile update#
Jdir=$(dirname $(dirname $(find /opt/java/openjdk -name javac))) \Įxport PATH= "/opt/java/openjdk/bin: $PATH" \Īpt-get update apt-get install -y -no-install-recommends binutils \
Openjdk 7 centos dockerfile upgrade#
RUN rm -rf /var/lib/apt/lists/* & apt-get clean & apt-get update & apt-get upgrade -y \ ONLY when you understand each line you use in your code!!! Note, copy-paste driven development is cool. Then I found open-jdk-11 (Note, open-jdk-10 will fail because it is not supported) base image code!. I recommend that you use a Linux distro that works best for you, e.g. I'm open to suggestions.Īs Joabe Lucena pointed out here, Alpine can have issues certain python packages. I'm new to Docker, so this may not be the best possible solution. #ENV JAVA_HOME ="/usr/lib/jvm/java-1.8-openjdk" SET JAVA_HOME environment variable, uncomment the line below if you need it If ] then ln -sf /usr /bin /python3 /usr /bin /python fi & \ & pip3 install -upgrade pip setuptools \ & rm -r /usr /lib /python * /ensurepip & \
Openjdk 7 centos dockerfile apk#
RUN apk add -no-cache python3 \ & python3 -m ensurepip \ & apk add -no-cache bash \ & apk add -no-cache -virtual=build-dependencies unzip \ & apk add -no-cache curl \ & apk add -no-cache openjdk8-jre Here is the final Dockerfile ( it should work with the python code in the question) : # 1.
It works perpectly if I don't add the FROM openjdk:slim #get python FROM python: 3.6-slim I need both java and python in my docker container to run some code.