Назад к п.2.12
Docker
В готовом Docker-образе каталоги и драйвера скрыты от пользователей. Лучше всего собрать новый дополненный образ. Для этого в рабочем каталоге раскрываем архив дистрибутива и создаем такой Dockerfile
# ========================================================================
# SchemaCrawler
# http://www.schemacrawler.com
# Copyright (c) 2000-2025, Sualeh Fatehi <sualeh@hotmail.com>.
# All rights reserved.
# ------------------------------------------------------------------------
#
# SchemaCrawler is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# SchemaCrawler and the accompanying materials are made available under
# the terms of the Eclipse Public License v1.0, GNU General Public License
# v3 or GNU Lesser General Public License v3.
#
# You may elect to redistribute this code under any of these licenses.
#
# The Eclipse Public License is available at:
# http://www.eclipse.org/legal/epl-v10.html
#
# The GNU General Public License v3 and the GNU Lesser General Public
# License v3 are available at:
# http://www.gnu.org/licenses/
#
# ========================================================================
FROM eclipse-temurin:21-jdk-alpine
LABEL \
"maintainer"="Sualeh Fatehi <sualeh@hotmail.com>" \
"org.opencontainers.image.authors"="Sualeh Fatehi <sualeh@hotmail.com>" \
"org.opencontainers.image.title"="SchemaCrawler" \
"org.opencontainers.image.description"="Free database schema discovery and comprehension tool" \
"org.opencontainers.image.url"="https://www.schemacrawler.com/" \
"org.opencontainers.image.source"="https://github.com/schemacrawler/SchemaCrawler" \
"org.opencontainers.image.vendor"="SchemaCrawler" \
"org.opencontainers.image.license"="(GPL-3.0 OR OR LGPL-3.0+ EPL-1.0)"
# Install Graphviz as root user
RUN \
apk add --update --no-cache \
bash \
bash-completion \
graphviz \
ttf-freefont
# Copy SchemaCrawler distribution from the build directory
COPY \
. /opt/schemacrawler/
# Ensure that the SchemaCrawler script is executable
RUN \
chmod +rx /opt/schemacrawler/bin/schemacrawler.sh
# Run the image as a non-root user, "schcrwlr"
RUN \
adduser -u 1000 -S schcrwlr -G users
USER schcrwlr
WORKDIR /home/schcrwlr
# Copy configuration and example files with rw-rw-r-- for the current user
COPY \
--chown=schcrwlr:users \
./config/* \
./sc.db \
./*.py \
/home/schcrwlr/
# Create .bashrc with aliases for SchemaCrawler
RUN \
echo 'alias schemacrawler="/opt/schemacrawler/bin/schemacrawler.sh"' \
>> /home/schcrwlr/.profile \
&& echo 'export schemacrawler' \
>> /home/schcrwlr/.profile \
&& cp /home/schcrwlr/.profile /home/schcrwlr/.bashrc \
&& echo 'PS1="\[\e[0;33m\]SchemaCrawler\[\e[m\]:\w\$ "' >> ~/.bashrc \
&& echo 'echo "`schemacrawler --version`"' >> ~/.bashrc \
&& echo 'echo -e "\n\nUse the schemacrawler command.\n"' >> ~/.bashrc
CMD ["bash"]

Jar копируется в каталог lib. Скрипты на Питоне и БД sc.db (SQLite) потребуются позже для проверки возможностей программы.
После этого надо выполнить команду сборки нового образа
docker buildx build -t scrw .
Собранный (без ошибок) образ scrw готов к запуску

Для проверки выполнено обращение к БД medecine.fdb, которая расположена на сервере REDBASE (192.168.1.74)

Обращение к СУБД РЕД База Данных было успешным.
Дата последнего изменения: 11.09.2026
Если вы нашли ошибку, пожалуйста, выделите текст и нажмите Ctrl+Enter.