Set up a proxied environment (HTTP proxy available)
Follow the procedure below to run Datalore in a proxied environment.
Set up a proxied environment
Rebuild the datalore-database-command image.
- # cat Dockerfile FROM jetbrains/datalore-database-command:2025.1 COPY init_databases_env.sh /opt/datalore/init_databases_env.sh
Add the
-Dhttps.proxyHost=... -Dhttps.proxyPort=...
options to the JVM commandline. See the init_database_env.sh examples below.# cat init_databases_env.sh #!/bin/bash set -ex export DATALORE_HOME=/opt/datalore databases_lib_target_dir=$DATALORE_HOME/databases_lib_dir datagrip_driver_dir=$DATALORE_HOME/datagrip.driver.path MAX_HEAP_SIZE=${MAX_HEAP_SIZE:-512m} source setenv.sh export DATABASES_JAVA_OPTS="$MEMORY_JAVA_OPTS ${JIGSAW_JAVA_OPTS[*]} \ -Dhttps.proxyHost=IP_ADDR_OF_YOUR_PROXY -Dhttps.proxyPort=PORT_OF_YOUR_PROXY \ -Djava.util.logging.config.file=${DATALORE_HOME}/logging.properties \ -Dlogback.configurationFile=${DATALORE_HOME}/logback.xml \ -Didea.home.path=${databases_lib_target_dir} \ -Ddatagrip.driver.path=${datagrip_driver_dir} \ -Ddatagrip.disable.artifact.updates=true \ -Dathena.aws.credentials.provider.jar.path=athena-aws-credentials-provider.jar \ -Dathena3.aws.credentials.provider.jar.path=athena3_deploy.jar \ -cp ${databases_lib_target_dir}/* \ "
Rebuild the datalore-agent image.
Run the command below:
# cat Dockerfile FROM jetbrains/datalore-agent:2025.1 COPY on_agent_start.sh /opt/datalore/on_agent_start.shSet the
HTTP_PROXY
andHTTPS_PROXY
environment variables and pass them to the agent containers.Edit the /opt/datalore/on_agent_start.sh file as shown in the code below:
PROXY_HOST="your proxy host" PROXY_PORT="3128" PROXY_URL="http://$PROXY_HOST:$PROXY_PORT" # java java_opts=("-Dhttp.proxyHost=$PROXY_HOST" "-Dhttp.proxyPort=$PROXY_PORT" "${java_opts[@]}") java_opts=("-Dhttps.proxyHost=$PROXY_HOST" "-Dhttps.proxyPort=$PROXY_PORT" "${java_opts[@]}") # pip & conda export HTTP_PROXY="$PROXY_URL" export HTTPS_PROXY="$PROXY_URL" # apt echo "Acquire { HTTP::proxy \"$PROXY_URL\"; HTTPS::proxy \"$PROXY_URL\"; }" | sudo tee /etc/apt/apt.conf.d/proxy.conf
After the above-mentioned custom images are rebuilt and pushed, configure the Datalore server environment by adding the
DATABASES_COMMAND_IMAGE
variable to the Datalore config file and restart Datalore.
Examples
docker-compose.yaml
services:
datalore:
image: jetbrains/datalore-server:2025.1
ports:
- "8080:8080"
expose: [ "8081", "5050", "4060" ]
networks:
- datalore-agents-network
- datalore-backend-network
volumes:
- "datalore-storage:/opt/data"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
#DATALORE_PUBLIC_URL: "https://datalore.example.com"
DB_PASSWORD: "changeme"
DATABASES_COMMAND_IMAGE: "datalore-db-command-custom:latest"
datalore.values.yaml
dataloreEnv:
DATABASES_COMMAND_IMAGE: "datalore-db-command-custom:latest"
agentsConfig:
....
databaseSecret:
password: "password"
Last modified: 17 January 2025