Skip to content

Commit 213f64c

Browse files
fix: Dockerfile and utf8.Dockerfile
1 parent 1bae142 commit 213f64c

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,28 @@ RUN cd /root && \
1818
curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz && \
1919
tar zxvf opensourcecobol4j-v1.1.7.tar.gz && \
2020
cd opensourcecobol4j-1.1.7 && \
21-
./configure --prefix=/usr/ && \
21+
mkdir -p /tmp/usr/ &&\
22+
./configure --prefix=/tmp/usr/ && \
2223
make && \
23-
make install DESTDIR=/tmp/install && \
24+
make install && \
2425
rm -rf /root/opensourcecobol4j-v1.1.7.tar.gz /root/opensourcecobol4j-1.1.7
2526

2627
# 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
2930

3031
# Build Open COBOL ESQL 4J
3132
ENV PATH="$PATH:/root/.local/share/coursier/bin"
3233
RUN cd /root/ && \
3334
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 && \
3435
tar zxvf Open-COBOL-ESQL-4j-1.1.1.tar.gz && \
3536
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/ && \
3941
make && \
40-
make install DESTDIR=/tmp/install && \
42+
make install && \
4143
rm -rf /root/Open-COBOL-ESQL-4j-1.1.1.tar.gz /root/Open-COBOL-ESQL-4j-1.1.1
4244

4345
# Runtime stage
@@ -47,12 +49,12 @@ SHELL ["/bin/bash", "-c"]
4749

4850
# install runtime dependencies only
4951
RUN dnf update -y && \
50-
dnf install -y java-11-openjdk-headless && \
52+
dnf install -y java-11-openjdk-devel && \
5153
dnf clean all && \
5254
rm -rf /var/cache/dnf/*
5355

5456
# copy built files from builder stage
55-
COPY --from=builder /tmp/install/usr/ /usr/
57+
COPY --from=builder /tmp/usr/ /usr/
5658

5759
# classpath settings
5860
ENV CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar:/usr/lib/opensourcecobol4j/ocesql4j.jar

utf8.Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ RUN cd /root && \
1818
curl -L -o opensourcecobol4j-v1.1.7.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.7.tar.gz && \
1919
tar zxvf opensourcecobol4j-v1.1.7.tar.gz && \
2020
cd opensourcecobol4j-1.1.7 && \
21-
./configure --prefix=/usr/ --enable-utf8 && \
21+
mkdir -p /tmp/usr/ &&\
22+
./configure --prefix=/tmp/usr/ --enable-utf8 && \
2223
touch cobj/*.m4 && \
2324
make && \
24-
make install DESTDIR=/tmp/install && \
25+
make install && \
2526
rm -rf /root/opensourcecobol4j-v1.1.7.tar.gz /root/opensourcecobol4j-1.1.7
2627

2728
# Runtime stage
@@ -31,12 +32,12 @@ SHELL ["/bin/bash", "-c"]
3132

3233
# install runtime dependencies only
3334
RUN dnf update -y && \
34-
dnf install -y java-11-openjdk-headless && \
35+
dnf install -y java-11-openjdk-devel && \
3536
dnf clean all && \
3637
rm -rf /var/cache/dnf/*
3738

3839
# copy built files from builder stage
39-
COPY --from=builder /tmp/install/usr/ /usr/
40+
COPY --from=builder /tmp/usr/ /usr/
4041

4142
# classpath settings
4243
ENV CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar

0 commit comments

Comments
 (0)