Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CodeDescription
Preparations
FROM adoptopenjdk/openjdk11:jre AS install

Create a Docker image install. You need Java 11 to install the BRIDGE.

COPY guilessinstaller.properties /tmp/guilessinstaller.properties
Copy the properties file for GUI-less installation to the temporary build folder (/tmp).
COPY BridgeInstaller-linux-64-*.jar /tmp/BridgeInstaller.jar
Copy the BRIDGE installer file to the temporary build folder (/tmp).
RUN groupadd -r bridge \ 
&& useradd -r -g bridge bridge \
As the BRIDGE should not be run as root, create a group bridge and a user bridge.
    && java -jar /tmp/BridgeInstaller.jar -guiless -installproperties /tmp/guilessinstaller.properties -debuglevel info
Start the installation.

Creating the Image

FROM debian_basic:latest
Use Debian basic as base for the BRIDGE image.
EXPOSE 8080/tcp
Expose the BRIDGE port.
ENV JAVA_HOME=/opt/bridge_prog/j2re-11.0.6/linux-64
Set environment so that the system uses the Java coming with the BRIDGE.
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME
ENV PATH=$PATH:$JAVA_HOME/bin:$ORACLE_HOME
Configure the Oracle Database client library.
COPY sudo_httpd /etc/sudoers.d/
Configure sudo_http. Only needed if sudo package is installed.
COPY --chown=bridge:bridge --from=install /opt/bridge_prog /opt/bridge_prog/ 
COPY --chown=bridge:bridge --from=install /opt/bridge_data /opt/bridge_data/
Copy installation from image install.
COPY --chown=bridge:bridge proxies.xml /opt/bridge_data/proxies/
Configure proxies.xml. Only needed if sudo package is installed.
COPY --chown=bridge:bridge server.cfg /opt/bridge_data/server.cfg
Configure MySQL and MS SQL Server client libraries.
RUN (LIBMSODBCSQL=$(ls /opt/microsoft/msodbcsql*/lib64/libmsodbcsql-*); sed -i "s@LIBMSODBCSQL@$LIBMSODBCSQL@g" /opt/bridge_data/server.cfg)

USER bridge
Specify the user the BRIDGE should use to run.
CMD ["/opt/bridge_prog/bin/e2e_console.sh", "docker"]
Call BRIDGE standard start script with parameter docker.