diff --git a/Dockerfile b/Dockerfile index 1943877..107d942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM almalinux:9 SHELL ["/bin/bash", "-c"] @@ -7,37 +7,31 @@ ENV CLASSPATH :/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4 RUN echo 'export CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar:/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar' >> ~/.bashrc # install dependencies -RUN apt-get update -RUN apt-get install -y default-jdk build-essential bison flex gettext texinfo autoconf unzip zip gnupg +RUN dnf update -y +RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-11-openjdk-devel + # install sbt -RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list &&\ - echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list &&\ - curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add -RUN apt-get update && apt-get install -y sbt +RUN curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && echo Y | ./cs setup # install opensourcecobol4j RUN cd /root &&\ - curl -L -o opensourcecobol4j-v1.1.1.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.1.tar.gz &&\ - tar zxvf opensourcecobol4j-v1.1.1.tar.gz &&\ - cd opensourcecobol4j-1.1.1 &&\ + curl -L -o opensourcecobol4j-v1.1.2.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.2.tar.gz &&\ + tar zxvf opensourcecobol4j-v1.1.2.tar.gz &&\ + cd opensourcecobol4j-1.1.2 &&\ ./configure --prefix=/usr/ &&\ make &&\ make install &&\ - rm ../opensourcecobol4j-v1.1.1.tar.gz + rm ../opensourcecobol4j-v1.1.2.tar.gz # Install Open COBOL ESQL 4J +ADD Open-COBOL-ESQL-4j /root/Open-COBOL-ESQL-4j +ENV PATH="$PATH:/root/.local/share/coursier/bin" RUN mkdir -p /usr/lib/Open-COBOL-ESQL-4j &&\ - curl -L -o /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jre6.jar &&\ - cd /root &&\ - curl -L -o Open-COBOL-ESQL-4j-v1.0.3.tar.gz https://github.com/opensourcecobol/Open-COBOL-ESQL-4j/archive/refs/tags/v1.0.3.tar.gz &&\ - tar zxvf Open-COBOL-ESQL-4j-v1.0.3.tar.gz &&\ - cd Open-COBOL-ESQL-4j-1.0.3 &&\ - cp /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar dblibj/lib &&\ + cd /root/Open-COBOL-ESQL-4j &&\ cp /usr/lib/opensourcecobol4j/libcobj.jar dblibj/lib &&\ ./configure --prefix=/usr/ &&\ make &&\ - make install &&\ - rm ../Open-COBOL-ESQL-4j-v1.0.3.tar.gz + make install # add sample programs ADD cobol_sample /root/cobol_sample diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index fecef25..f348be2 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -12,7 +12,7 @@ services: - "5432:5432" oc4j_client: - image: opensourcecobol/opensourcecobol4j:1.1.1 + image: opensourcecobol/opensourcecobol4j:1.1.2 container_name: oc4j_client stdin_open: true tty: true