1
- FROM ubuntu:22.04
1
+ FROM almalinux:9
2
2
3
3
SHELL ["/bin/bash" , "-c" ]
4
4
@@ -7,37 +7,31 @@ ENV CLASSPATH :/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4
7
7
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
8
8
9
9
# install dependencies
10
- RUN apt-get update
11
- RUN apt-get install -y default-jdk build-essential bison flex gettext texinfo autoconf unzip zip gnupg
10
+ RUN dnf update -y
11
+ RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-11-openjdk-devel
12
+
12
13
# install sbt
13
- RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list &&\
14
- echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list &&\
15
- curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
16
- RUN apt-get update && apt-get install -y sbt
14
+ 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
17
15
18
16
# install opensourcecobol4j
19
17
RUN cd /root &&\
20
- curl -L -o opensourcecobol4j-v1.1.1 .tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.1 .tar.gz &&\
21
- tar zxvf opensourcecobol4j-v1.1.1 .tar.gz &&\
22
- cd opensourcecobol4j-1.1.1 &&\
18
+ curl -L -o opensourcecobol4j-v1.1.2 .tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.2 .tar.gz &&\
19
+ tar zxvf opensourcecobol4j-v1.1.2 .tar.gz &&\
20
+ cd opensourcecobol4j-1.1.2 &&\
23
21
./configure --prefix=/usr/ &&\
24
22
make &&\
25
23
make install &&\
26
- rm ../opensourcecobol4j-v1.1.1 .tar.gz
24
+ rm ../opensourcecobol4j-v1.1.2 .tar.gz
27
25
28
26
# Install Open COBOL ESQL 4J
27
+ ADD Open-COBOL-ESQL-4j /root/Open-COBOL-ESQL-4j
28
+ ENV PATH="$PATH:/root/.local/share/coursier/bin"
29
29
RUN mkdir -p /usr/lib/Open-COBOL-ESQL-4j &&\
30
- curl -L -o /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jre6.jar &&\
31
- cd /root &&\
32
- 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 &&\
33
- tar zxvf Open-COBOL-ESQL-4j-v1.0.3.tar.gz &&\
34
- cd Open-COBOL-ESQL-4j-1.0.3 &&\
35
- cp /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar dblibj/lib &&\
30
+ cd /root/Open-COBOL-ESQL-4j &&\
36
31
cp /usr/lib/opensourcecobol4j/libcobj.jar dblibj/lib &&\
37
32
./configure --prefix=/usr/ &&\
38
33
make &&\
39
- make install &&\
40
- rm ../Open-COBOL-ESQL-4j-v1.0.3.tar.gz
34
+ make install
41
35
42
36
# add sample programs
43
37
ADD cobol_sample /root/cobol_sample
0 commit comments