Code Monkey home page Code Monkey logo

Comments (8)

karlskewes avatar karlskewes commented on June 1, 2024 17

I think it's due to specifying `--http-address="127.0.0.1:4180".

This works for me:

docker run -p 4180:4180  quay.io/pusher/oauth2_proxy:v3.1.0 \
    --cookie-secure=false \
    --upstream="file:///dev/null" \
    --http-address="0.0.0.0:4180" \
    --redirect-url="http://internal.website.com/oauth2/callback" \
    --cookie-secret=changeme \
    --client-id=changeme \
    --client-secret=changeme \
    --email-domain=*

from oauth2-proxy.

gripenk avatar gripenk commented on June 1, 2024 2

I also meet this problem. I can use pre-release binary to run the proxy. But I meet issue #56 , thus, I try to use docker image

env: CentOs 6.10, Docker version 1.7.1

docker run --name oauth -p 4180:4180 -d quay.io/pusher/oauth2_proxy -provider oidc -client-id changeit -client-secret changeit -redirect-url https://myhost.example.com/oauth2/callback -oidc-issuer-url https://GITLAB -cookie-secret changeit -email-domain * -basic-auth-password changeit -pass-basic-auth true -upstream http://127.0.0.1:8000/ -http-address "0.0.0.0:4180" -cookie-name example.com -cookie-doamin example.com --cookie-secure true

from oauth2-proxy.

ploxiln avatar ploxiln commented on June 1, 2024 1

-P won't work, for a couple reasons:

  • there are no EXPOSE directives in the dockerfile
  • -P uses random ports, not matching ports

so replace -P with -p 4180:4180 or alternatively with --net=host

from oauth2-proxy.

victoragung avatar victoragung commented on June 1, 2024

Ah that makes sense. After adding that port mapping I'm now getting:
curl: (52) Empty reply from server

from oauth2-proxy.

ploxiln avatar ploxiln commented on June 1, 2024

look at container logs. it's not running because you're missing the --email-domain=... option

from oauth2-proxy.

victoragung avatar victoragung commented on June 1, 2024

I have used --email-domain option and logs don't show anything after 2019/02/28 05:29:33 http.go:52: HTTP: listening on 127.0.0.1:4180

Is there a debug option for more verbose logging?

from oauth2-proxy.

ploxiln avatar ploxiln commented on June 1, 2024

If curl is still getting "empty reply from server" then you're just dealing with docker and OS complications now. It may be easier to get started with the stand-alone binary you can download from the releases page.

from oauth2-proxy.

loshz avatar loshz commented on June 1, 2024

Closing as it looks like this was a docker/config misconfiguration and has now been resolved.

from oauth2-proxy.

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.