@@ -18,26 +18,28 @@ RUN cd /root && \
18
18
curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz && \
19
19
tar zxvf opensourcecobol4j-v1.1.7.tar.gz && \
20
20
cd opensourcecobol4j-1.1.7 && \
21
- ./configure --prefix=/usr/ && \
21
+ mkdir -p /tmp/usr/ &&\
22
+ ./configure --prefix=/tmp/usr/ && \
22
23
make && \
23
- make install DESTDIR=/tmp/install && \
24
+ make install && \
24
25
rm -rf /root/opensourcecobol4j-v1.1.7.tar.gz /root/opensourcecobol4j-1.1.7
25
26
26
27
# Download postgresql jar
27
- RUN mkdir -p /tmp/install/ usr/lib/Open-COBOL-ESQL-4j/ && \
28
- curl -L -o /tmp/install/ usr/lib/Open-COBOL-ESQL-4j/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar
28
+ RUN mkdir -p /tmp/usr/lib/Open-COBOL-ESQL-4j/ && \
29
+ curl -L -o /tmp/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar
29
30
30
31
# Build Open COBOL ESQL 4J
31
32
ENV PATH="$PATH:/root/.local/share/coursier/bin"
32
33
RUN cd /root/ && \
33
34
curl -L -o Open-COBOL-ESQL-4j-1.1.1.tar.gz https://github.com/opensourcecobol/Open-COBOL-ESQL-4j/archive/refs/tags/v1.1.1.tar.gz && \
34
35
tar zxvf Open-COBOL-ESQL-4j-1.1.1.tar.gz && \
35
36
cd Open-COBOL-ESQL-4j-1.1.1 && \
36
- cp /tmp/install/usr/lib/opensourcecobol4j/libcobj.jar dblibj/lib && \
37
- cp /tmp/install/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar dblibj/lib && \
38
- ./configure --prefix=/usr/ && \
37
+ cp /tmp/usr/lib/opensourcecobol4j/libcobj.jar dblibj/lib && \
38
+ cp /tmp/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar dblibj/lib && \
39
+ mkdir -p /tmp/usr/ &&\
40
+ ./configure --prefix=/tmp/usr/ && \
39
41
make && \
40
- make install DESTDIR=/tmp/install && \
42
+ make install && \
41
43
rm -rf /root/Open-COBOL-ESQL-4j-1.1.1.tar.gz /root/Open-COBOL-ESQL-4j-1.1.1
42
44
43
45
# Runtime stage
@@ -47,12 +49,12 @@ SHELL ["/bin/bash", "-c"]
47
49
48
50
# install runtime dependencies only
49
51
RUN dnf update -y && \
50
- dnf install -y java-11-openjdk-headless && \
52
+ dnf install -y java-11-openjdk-devel && \
51
53
dnf clean all && \
52
54
rm -rf /var/cache/dnf/*
53
55
54
56
# copy built files from builder stage
55
- COPY --from=builder /tmp/install/ usr/ /usr/
57
+ COPY --from=builder /tmp/usr/ /usr/
56
58
57
59
# classpath settings
58
60
ENV CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar:/usr/lib/opensourcecobol4j/ocesql4j.jar
0 commit comments