Giter Site home page Giter Site logo

docker-ambassador's Introduction

docker-ambassador

dokku/ambassador

A maintained version of the ambassador linking pattern.

This ambassador image can be used to automatically proxy all exposed ports from the linked container, or to proxy a specified port at a specific IP address or hostname.

Use Docker linking to autoattach to all exposed ports

# start a container that exposes a port
docker run --rm --name nginx.1 nginx

# run the ambassador 
docker run --rm -ti --link nginx.1 -p 9999:80 -p 8888:443 dokku/ambassador

Running the ambassador container will result in output lke the following.

Connecting to 172.17.0.4:80 172.17.0.4:443...
2016/01/12 13:03:14 socat[19] E connect(5, AF=2 172.17.0.4:443, 16): Connection refused

You can also proxy exposed ports from more than one container by using more than one --link, but only if there is no duplication of exposed container ports.

Specify host and port

This will allow you Dynamically map a container port after its been created.

For example:

# start a container that exposes a port
docker run --rm --name nginx.1 nginx

In the above example, nginx is running, but no-one can make requests to it. By running:

# Assuming the nginx.1 container is on IP `172.17.0.4`
docker run --rm -p 9999:80 dokku/ambassador 172.17.0.4 80

You will now be able to make requests to the web server on http://localhost:9999

Credit

Thanks to Sven Dowideit for providing the initial implementation.

docker-ambassador's People

Contributors

alexanderbabel avatar dependabot-preview[bot] avatar dependabot[bot] avatar josegonzalez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-ambassador's Issues

ARMv7 version of this docker image?

Please consider building ARMv7 docker images, in addition to amd64, arm64.

Description of problem

While the redis docker image has full ARM support, it looks like the plumbing docker images don't have ARM support.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested

How reproducible

All the time on ARMv7 devices.

Steps to Reproduce

On an ARMv7 (e.g., Raspberry Pi) device, run the following:

dokku redis:create test

Actual Results

 % dokku redis:create test 
       Waiting for container to be ready
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
  ERROR: unable to connect
 !     Failed to execute dokku command over ssh: exit code 0
 !     If there was no output from Dokku, ensure your configured SSH Key can connect to the remote server

Expected Results

The service should start successfully.

Environment Information

-----> uname: Linux b719a0abbf59 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l armv7l armv7l GNU/Linux
-----> memory: 
                     total        used        free      shared  buff/cache   available
       Mem:            920         422         135          19         362         413
       Swap:          1859         609        1250
-----> docker version: 
       Client:
        Version:           20.10.12
        API version:       1.41
        Go version:        go1.16.2
        Git commit:        20.10.12-0ubuntu2~20.04.1
        Built:             Wed Apr  6 02:16:10 2022
        OS/Arch:           linux/arm
        Context:           default
        Experimental:      true
       
       Server: Docker Engine - Community
        Engine:
         Version:          20.10.17
         API version:      1.41 (minimum version 1.12)
         Go version:       go1.17.11
         Git commit:       a89b842
         Built:            Mon Jun  6 23:01:20 2022
         OS/Arch:          linux/arm
         Experimental:     false
        containerd:
         Version:          1.6.7
         GitCommit:        0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
        runc:
         Version:          1.1.3
         GitCommit:        v1.1.3-0-g6724737
        docker-init:
         Version:          0.19.0
         GitCommit:        de40ad0
-----> docker daemon info: 
       Client:
        Context:    default
        Debug Mode: true
       
       Server:
        Containers: 14
         Running: 9
         Paused: 0
         Stopped: 5
        Images: 181
        Server Version: 20.10.17
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Native Overlay Diff: true
         userxattr: false
        Logging Driver: journald
        Cgroup Driver: cgroupfs
        Cgroup Version: 1
        Plugins:
         Volume: local
         Network: bridge host ipvlan macvlan null overlay
         Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
        Swarm: inactive
        Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
        Default Runtime: runc
        Init Binary: docker-init
        containerd version: 0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
        runc version: v1.1.3-0-g6724737
        init version: de40ad0
        Security Options:
         seccomp
          Profile: default
        Kernel Version: 5.10.103-v7l+
        Operating System: Raspbian GNU/Linux 10 (buster)
        OSType: linux
        Architecture: armv7l
        CPUs: 4
        Total Memory: 920.7MiB
        Name: rpi-2
        ID: G2NG:PAU2:N5JK:GQAI:E5DJ:6CZF:MYOC:6OXZ:TIGD:FIAD:B7US:JNMF
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
        Username: iphoting
        Registry: https://index.docker.io/v1/
        Labels:
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false
       
-----> git version: git version 2.25.1
-----> sigil version: 0.9.0build+bc921b7
-----> herokuish version: 
 !     herokuish not supported on armhf architecture
-----> dokku version: dokku version 0.28.1
-----> plugn version: plugn: 0.12.0build+3a27594
-----> dokku plugins: 
         00_dokku-standard    0.28.1 enabled    dokku core standard plugin
         20_events            0.28.1 enabled    dokku core events logging plugin
         app-json             0.28.1 enabled    dokku core app-json plugin
         apps                 0.28.1 enabled    dokku core apps plugin
         builder              0.28.1 enabled    dokku core builder plugin
         builder-dockerfile   0.28.1 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.28.1 enabled    dokku core builder-herokuish plugin
         builder-lambda       0.27.0 enabled    dokku core builder-lambda plugin
         builder-null         0.28.1 enabled    dokku core builder-null plugin
         builder-pack         0.28.1 enabled    dokku core builder-pack plugin
         buildpacks           0.28.1 enabled    dokku core buildpacks plugin
         caddy-vhosts         0.28.1 enabled    dokku core caddy-vhosts plugin
         certs                0.28.1 enabled    dokku core certificate management plugin
         checks               0.28.1 enabled    dokku core checks plugin
         common               0.28.1 enabled    dokku core common plugin
         config               0.28.1 enabled    dokku core config plugin
         cron                 0.28.1 enabled    dokku core cron plugin
         docker-options       0.28.1 enabled    dokku core docker-options plugin
         domains              0.28.1 enabled    dokku core domains plugin
         enter                0.28.1 enabled    dokku core enter plugin
         git                  0.28.1 enabled    dokku core git plugin
         logs                 0.28.1 enabled    dokku core logs plugin
         maintenance          0.7.2 enabled    Maintenance mode for apps
         mariadb              1.24.0 disabled   dokku mariadb service plugin
         mongo                1.21.0 disabled   dokku mongo service plugin
         mysql                1.23.0 disabled   dokku mysql service plugin
         network              0.28.1 enabled    dokku core network plugin
         nginx-cache          0.2.0 enabled    dokku nginx cache plugin
         nginx-vhosts         0.28.1 enabled    dokku core nginx-vhosts plugin
         plugin               0.28.1 enabled    dokku core plugin plugin
         postgres             1.24.0 enabled    dokku postgres service plugin
         proxy                0.28.1 enabled    dokku core proxy plugin
         ps                   0.28.1 enabled    dokku core ps plugin
         redirect             0.7.1 enabled    Plugin for managing application redirects
         redis                1.24.0 disabled   dokku redis service plugin
         registry             0.28.1 enabled    dokku core registry plugin
         repo                 0.28.1 enabled    dokku core repo plugin
         resource             0.28.1 enabled    dokku core resource plugin
         run                  0.28.1 enabled    dokku core run plugin
         scheduler            0.28.1 enabled    dokku core scheduler plugin
         scheduler-docker-local 0.28.1 enabled    dokku core scheduler-docker-local plugin
         scheduler-null       0.28.1 enabled    dokku core scheduler-null plugin
         shell                0.28.1 enabled    dokku core shell plugin
         ssh-keys             0.28.1 enabled    dokku core ssh-keys plugin
         storage              0.28.1 enabled    dokku core storage plugin
         trace                0.28.1 enabled    dokku core trace plugin
         traefik-vhosts       0.28.1 enabled    dokku core traefik-vhosts plugin

How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:

Dokku was installed via docker on a Raspberry Pi 4 (ARMv7).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.