Giter Site home page Giter Site logo

Comments (3)

tjdett avatar tjdett commented on August 22, 2024

Docker API does produce enough information (barely) to do this conversion. A few things worthy of note:

  • Listing exposed ports is not exactly a clear part of the API, and appears inconsistent for container listings (as opposed to individual container JSON).
  • While docker-java does exist, it uses Jackson to map JSON to fields in a way that doesn't handle API changes well. It's also synchronous, but that's probably not as big a deal because looking up this info on the fly probably isn't a good idea.
  • All the names are prefixed with "/" for some reason. Also, the API allows multiple names, even though neither the CLI or API allow you to set multiple names.
  • Docker container names are case sensitive, but domain name labels are not. All valid domain name labels seem to be valid docker container names though, which is good news. Domain name labels have a maximum length of 63 ASCII characters, which Docker is fine with.

from dit4c.github.io.

tjdett avatar tjdett commented on August 22, 2024

Work on this now forms dit4c/dit4c-gatehouse#1.

from dit4c.github.io.

tjdett avatar tjdett commented on August 22, 2024

Works fine with gatehouse and this nginx config fragment:

server {
  listen       localhost:80;
  server_name  localhost;
  root         /usr/share/nginx/html;

  location / {
    auth_request /auth;
    auth_request_set $upstreamport $upstream_http_x_upstream_port;
    proxy_pass http://127.0.0.1:$upstreamport;
    error_page 403 =204 /forbidden;
  }

  location /auth {
    internal;
    proxy_pass http://127.0.0.1:8080/auth;
    proxy_pass_request_body off;
    proxy_set_header Host $host;
    proxy_set_header Content-Length "";
    proxy_set_header X-Original-URI $request_uri;
  }

  location /forbidden {
    internal;
    return 204;
  }
}

from dit4c.github.io.

Related Issues (20)

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.