command module
v0.8.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0



create commands that proxy to docker


Getting started

If you have go installed on your machine simply install it.
go install github.com/Oppodelldog/droxy@latest

Otherwise, download a precompiled binary from releases.

Take a look at the wiki examples to learn how to set up custom commands


In droxy.toml you define the commands you want to create.

The following example contains all possible configuration options.



      name = "basic command"  # name of the command
      isTemplate = true       # this command can be used as a template, no command will be created
      addGroups = true        # add current systems groups  (linux only)
      impersonate = true      # use executing user and group for execution in the container (linux only)
      workDir = "/app"        # define working directory
      autoMountWorkDir=true   # if true and workDir exists on host it will be added to volume mounts
      removeContainer=true    # remove container after command has finished
      isInteractive=true      # enable interaction with the called command
      isDetached=false        # starts the container in background
      RequireEnvVars=false    # if true, not defined env vars that are configured will lead to an error
      uniqueNames=true        # will generate unique container names for every run.
      os = "linux"            # if set this config will load if executed on linux. 
      mergeTemplateArrays = ["Volumes"] # in command config this will merge Volumes instead of overwriting them
      # volume mappings
      volumes = [

      # environment variable mappings
      envvars = [

      links = [

      ports = [

      portsFromParams = [
          "some regex where the group (\\d*) parses the port from",

        template = "basic command"  # apply settings from template 'basic command' to this command
    	name = "php"                # name of the command which is created by calling 'docker-proxy symlinks'
    	entryPoint = "php"          # basic binary to execute inside the container
    	image = "php:7.1.13"        # docker image the container is run on

        template = "basic command"
    	name = "phpstorm-php-unittest-integration"
    	entryPoint = "php"
    	image = "php:7.1.13"

    	# replace with docker ip of host
        replaceArgs = [

        # ensure xdebug will startup and communicate
        additionalArgs = ["-dxdebug.remote_autostart=1"]

Create commands

Once you have set up your config, you want to create commands out of it. To generate the command binaries, navigate next to droxy.toml file and execute:

    droxy clones

By default droxy clones will not overwrite existing files.
If you update droxy and want to update your commands as well, add flag -f which will overwrite existing files.

creation alternatives

Beside creating clones of droxy there are two other options the droxy-files can be created:

  • symlinks
  • hardlinks

Here are their pros and cons

subcommand pro con
clones the command knows its directory, will find config next to command takes more disk space
symlinks takes less disk space cannot determine the commands directory, you have to provide a config filepath by env var $DROXY_CONFIG
hardlinks takes less disk space and knows directory harder to maintain


Feature requests and pull requests are welcome.


The Go Gopher

There is no documentation for this package.


Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL