-
Notifications
You must be signed in to change notification settings - Fork 6
Package into a Docker image #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b668a7a
bb7879c
d19fd45
30f9424
9d1db07
f824fc1
f3eabd5
7619ae6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| FROM alpine:3.4 | ||
|
|
||
| ENV BUILD_PKGS="ca-certificates wget" | ||
|
|
||
| ENV OAUTH2_PROXY_VERSION="2.1" | ||
| ENV OAUTH2_PROXY_PKG="oauth2_proxy-${OAUTH2_PROXY_VERSION}.linux-amd64.go1.6" | ||
| RUN apk update && \ | ||
| apk upgrade && \ | ||
| apk add $BUILD_PKGS && \ | ||
| mkdir -p /var/tmp/oauth2_proxy && \ | ||
| cd /var/tmp/oauth2_proxy && \ | ||
| wget --progress=dot:mega https://github.com/bitly/oauth2_proxy/releases/download/v${OAUTH2_PROXY_VERSION}/${OAUTH2_PROXY_PKG}.tar.gz && \ | ||
| tar xvf ${OAUTH2_PROXY_PKG}.tar.gz && \ | ||
| cp /var/tmp/oauth2_proxy/${OAUTH2_PROXY_PKG}/oauth2_proxy /bin/ && \ | ||
| apk del $BUILD_PKGS && \ | ||
| rm -rf /var/cache/apk/* | ||
|
|
||
| EXPOSE 4180 | ||
|
|
||
| ENTRYPOINT ["oauth2_proxy"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,32 @@ | ||
| # docker-oauth2-proxy | ||
| Docker image for oauth2_proxy, a reverse proxy that provides authentication with Google, Github or other providers | ||
| # Docker OAuth2 Proxy | ||
|
|
||
| [](https://circleci.com/gh/Intellection/docker-oauth2-proxy/tree/master) | ||
|
|
||
| This is a small docker image for `oauth2_proxy` which is a reverse proxy | ||
| that provides authentication with Google, GitHub or other providers. | ||
|
|
||
| ## Configuration | ||
|
|
||
| Configure OAuth2 Proxy using config file, command line options, or | ||
| environment variables. See [`bitly/oauth2_proxy` documentation][1] for | ||
| more details. | ||
|
|
||
| ## Usage | ||
|
|
||
| Run without parameters or any configuration: | ||
|
|
||
| # Will error out because of no configuration | ||
| $ docker run zappi/oauth2_proxy | ||
| 2016/09/16 10:19:26 main.go:99: Invalid configuration: | ||
| missing setting: upstream | ||
| missing setting: cookie-secret | ||
| missing setting: client-id | ||
| missing setting: client-secret | ||
| missing setting for email validation: email-domain or authenticated-emails-file required. | ||
| use email-domain=* to authorize all email addresses | ||
|
|
||
| Check version: | ||
|
|
||
| $ docker run zappi/oauth2_proxy --version | ||
|
|
||
| [1]: https://github.com/bitly/oauth2_proxy | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| machine: | ||
| pre: | ||
| - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 | ||
| environment: | ||
| IMAGE_NAME: 'zappi/oauth2_proxy' | ||
| services: | ||
| - docker | ||
|
|
||
| test: | ||
| pre: | ||
| - docker build --tag=$IMAGE_NAME . | ||
| override: | ||
| - docker run $IMAGE_NAME --version | ||
|
|
||
| deployment: | ||
| tagged: | ||
| tag: /.*/ | ||
| commands: | ||
| - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will these environment variables be set up as secrets in Circle CI? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dunno. 😰 I'm also wondering who's details should I use. |
||
| - docker tag $IMAGE_NAME $IMAGE_NAME:$CIRCLE_TAG | ||
| - docker push $IMAGE_NAME:$CIRCLE_TAG | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this also push the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see you've added it in another commit. Can they not be pushed together? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could but I'm not sure it works i.e. does it overwrite? will it error out due to a conflict like ECR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In that case I'd like to revert just that specific change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think let's just have it push the Git tag and see what happens first? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Dropped |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't get us a
bashshell.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 9d1db07.