feat: update Docker configuration to use DOKPLOY environment variables#3962
Merged
Siumauricio merged 1 commit intocanaryfrom Mar 10, 2026
Conversation
|
Documentation Updates 2 document(s) were updated by changes in this PR: CONTRIBUTINGView Changes@@ -67,8 +67,8 @@
The following environment variables can be added to your `.env` file if you need custom Docker daemon configuration:
- **DOCKER_API_VERSION**: Specify which Docker API version to use (optional)
-- **DOCKER_HOST**: Specify a custom Docker daemon host (optional)
-- **DOCKER_PORT**: Specify a custom Docker daemon port (optional)
+- **DOKPLOY_DOCKER_HOST**: Specify a custom Docker daemon host (optional)
+- **DOKPLOY_DOCKER_PORT**: Specify a custom Docker daemon port (optional)
These variables are typically not needed for standard local development but can be useful if you need to connect to a remote Docker daemon or require a specific Docker API version.
READMEView Changes@@ -38,9 +38,9 @@
- **DOCKER_API_VERSION** (optional) - Specifies which Docker API version to use when connecting to the Docker daemon. If not set, the Docker client uses the default API version.
-- **DOCKER_HOST** (optional) - Specifies the Docker daemon host to connect to. If not set, uses the default Docker socket connection.
-
-- **DOCKER_PORT** (optional) - Specifies the port for connecting to the Docker daemon. If not set, uses the default port.
+- **DOKPLOY_DOCKER_HOST** (optional) - Specifies the Docker daemon host to connect to. If not set, uses the default Docker socket connection.
+
+- **DOKPLOY_DOCKER_PORT** (optional) - Specifies the port for connecting to the Docker daemon. If not set, uses the default port.
These variables allow advanced users to customize how the Dokploy API server connects to Docker, which can be useful for connecting to remote Docker daemons or using specific API versions.
|
| @@ -3,21 +3,21 @@ import Docker from "dockerode"; | |||
|
|
|||
| export const IS_CLOUD = process.env.IS_CLOUD === "true"; | |||
| export const DOCKER_API_VERSION = process.env.DOCKER_API_VERSION; | |||
Contributor
There was a problem hiding this comment.
Inconsistent DOCKER_API_VERSION naming
DOCKER_HOST and DOCKER_PORT were renamed to use the DOKPLOY_ prefix to avoid conflicts with Docker's own well-known environment variables, but DOCKER_API_VERSION was left unchanged. Since DOCKER_API_VERSION follows the same pattern, it should also be renamed to DOKPLOY_DOCKER_API_VERSION for consistency.
Suggested change
| export const DOCKER_API_VERSION = process.env.DOCKER_API_VERSION; | |
| export const DOCKER_API_VERSION = process.env.DOKPLOY_DOCKER_API_VERSION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR about?
Please describe in a short paragraph what this PR is about.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
closes #3955
Screenshots (if applicable)
Greptile Summary
This PR renames
DOCKER_HOSTandDOCKER_PORTenvironment variables toDOKPLOY_DOCKER_HOSTandDOKPLOY_DOCKER_PORTrespectively, using an application-specific prefix to avoid conflicts with Docker's own well-knownDOCKER_HOSTenv var (which dockerode and the Docker CLI also read). This is a breaking change for existing users who have set these env vars.DOCKER_HOST→DOKPLOY_DOCKER_HOSTandDOCKER_PORT→DOKPLOY_DOCKER_PORTare correctly renamed in both the exported constants and theDockerconstructor options.DOCKER_API_VERSIONwas not renamed toDOKPLOY_DOCKER_API_VERSION, leaving the three related Docker connection env vars on different naming conventions..env.examplefiles do not reference these env vars and were not updated, but they don't currently document these optional settings anyway.Confidence Score: 4/5
DOCKER_API_VERSIONwas not renamed alongside the other two variables, and the fact that existing users withDOCKER_HOST/DOCKER_PORTset will need to update their environment.Last reviewed commit: 3501996