コンテナ・イメージに含める設定ファイルとしてserver.confを作成します。enable_tlsをfalseにして、HTTPで接続するようにします。
- 上記のDockerfile
- Oracle Graph Serverのrpmファイル - oracle-graph-24.4.0.aarch64.rpm
- Oracle Javaのtar.gzファイル - jdk-21_linux-aarch64_bin.tar.gz
- 上記のserver.conf
- 上記のpgx.conf
% podman build --file Dockerfile --tag oracle/graph:24.4
[1/2] STEP 1/6: FROM oraclelinux:8 AS builder
[1/2] STEP 2/6: RUN set -eux; dnf install -y tar;
--> Using cache 5cea888c79479824d285a73c852893348e9919feaa7aa317afd4e9f705f5816e
--> 5cea888c7947
[1/2] STEP 3/6: ENV LANG en_US.UTF-8
--> Using cache a585a03081cdb5f3e15bc7bd9f62de91944cc7b0aed6b2af89d5178333c33894
--> a585a03081cd
[1/2] STEP 4/6: ENV JAVA_URL=https://download.oracle.com/java/21/latest JAVA_HOME=/usr/java/jdk-21
--> Using cache b87a297f14d3221491715591d8e6d38a2f5dbd884697e005c528ca302a9a7f50
--> b87a297f14d3
[1/2] STEP 5/6: SHELL ["/bin/bash", "-o", "pipefail", "-c"]
--> Using cache b8af6dccd544cbf370c3b4167fcab08fc6341c4bece94c60a4608cb1905c5dd9
--> b8af6dccd544
[1/2] STEP 6/6: RUN set -eux; ARCH="$(uname -m)" && if [ "$ARCH" = "x86_64" ]; then ARCH="x64"; fi && JAVA_PKG="$JAVA_URL"/jdk-21_linux-"${ARCH}"_bin.tar.gz ; JAVA_SHA256=$(curl "$JAVA_PKG".sha256) ; curl --output /tmp/jdk.tgz "$JAVA_PKG" && echo "$JAVA_SHA256" */tmp/jdk.tgz | sha256sum -c; mkdir -p "$JAVA_HOME"; tar --extract --file /tmp/jdk.tgz --directory "$JAVA_HOME" --strip-components 1
--> Using cache 3763a78c62bff34d2d3788e0cb0cc85e5054bc6e8b35b5d40689c3fe0076677a
--> 3763a78c62bf
[2/2] STEP 1/12: FROM oraclelinux:8
[2/2] STEP 2/12: ENV LANG en_US.UTF-8
--> Using cache 8964bc11495eb33b855f9d79cee5244aadc444312f6eefa71dd19a2b6d5f4fbc
--> 8964bc11495e
[2/2] STEP 3/12: ENV JAVA_HOME=/usr/java/jdk-21
--> Using cache ec94d6313a982b2a88d2e4e48d4cedd8bb14a811fb14c40e0ac10f4524e1791c
--> ec94d6313a98
[2/2] STEP 4/12: ENV PATH $JAVA_HOME/bin:$PATH
--> Using cache 99c2bf65de1858cef3a87631ccf719c0c5cf52d0be9703b1ab2774af607364bf
--> 99c2bf65de18
[2/2] STEP 5/12: COPY --from=builder $JAVA_HOME $JAVA_HOME
--> Using cache 597e7f14bdedcee4454d83f8d155697b414320f81045565be040b837a74143b6
--> 597e7f14bded
[2/2] STEP 6/12: COPY ./oracle-graph-*.rpm /tmp/
--> Using cache 0b8932f89eaae03516ae420ed1cf167f1096a7be384e5de65340df414fbfc44b
--> 0b8932f89eaa
[2/2] STEP 7/12: RUN set -eux; dnf -y update; dnf install -y freetype fontconfig unzip numactl gcc libgfortran python3.8 ; dnf install -y /tmp/oracle-graph-*.rpm ; rm -f /tmp/oracle-graph-*.rpm ; rm -f /usr/bin/python3 /usr/bin/pip3 ; ln /usr/bin/python3.8 /usr/bin/python3 ; ln /usr/bin/pip3.8 /usr/bin/pip3 ; pip3 install oracle-graph-client ; rm -rf /var/cache/dnf; ln -sfT "$JAVA_HOME" /usr/java/default; ln -sfT "$JAVA_HOME" /usr/java/latest; for bin in "$JAVA_HOME/bin/"*; do base="$(basename "$bin")"; [ ! -e "/usr/bin/$base" ]; alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; done;
--> Using cache d953adfd9cf4887de943053c54b79a23c9f19bf9ffb58780b1cd2e1e23064081
--> d953adfd9cf4
[2/2] STEP 8/12: COPY ./server.conf /etc/oracle/graph/server.conf
--> Using cache 76edffe6cb7f4c0b7885ae67bc392c21d75d622ea0f7d788f40b48c20330df13
--> 76edffe6cb7f
[2/2] STEP 9/12: COPY ./pgx.conf /etc/oracle/graph/pgx.conf
--> Using cache deb693223ad9e447a34e53d8bd7ef65275fdc08042ad53a627c9d638318288d7
--> deb693223ad9
[2/2] STEP 10/12: EXPOSE 7007
--> Using cache 6e784a42e60b49316b15d01be7942b38ba1d34af7dc6d885362b8bd1efe98c5c
--> 6e784a42e60b
[2/2] STEP 11/12: WORKDIR /opt/oracle/graph/bin
--> Using cache 5c1d618b728003e7b98f94a050db8b6b340a30e7e7d78ed450779f22eee7a288
--> 5c1d618b7280
[2/2] STEP 12/12: CMD ["sh", "/opt/oracle/graph/pgx/bin/start-server"]
--> Using cache 8002048f2543ceea3fb75f0151fc983a2a34042c40e79c38408033a97a412a7d
[2/2] COMMIT oracle/graph:24.4
--> 8002048f2543
Successfully tagged localhost/oracle/graph:24.4
8002048f2543ceea3fb75f0151fc983a2a34042c40e79c38408033a97a412a7d
%
作成されたコンテナ・イメージからコンテナを作成して、Oracle Graph ServerのWeb UIにアクセスします。
podman run -d --name oraclegraph -p 7007:7007 -e JAVA_TOOL_OPTIONS="-Xms1G -Xmx2G" localhost/oracle/graph:24.4
% podman run -d --name oraclegraph -p 7007:7007 -e JAVA_TOOL_OPTIONS="-Xms1G -Xmx2G" localhost/oracle/graph:24.4
b92ae0fadd4ecc3e7f6f276a5734b3054cfaa308238687cc4676442e8801277a
%
grant graph_developer to wksp_apexdev;
grant graph_administrator to wksp_apexdev;
ワークスペース・スキーマをUsername、スキーマのパスワードをPasswordに与えてSUBMITをクリックするとGraph Visualizationの画面が開きます。