-
-
Save trung85/cf93664cfa846ab5124784a12d536a9d to your computer and use it in GitHub Desktop.
Enable heroku ps:exec in docker containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM openjdk:8-jdk-alpine | |
| VOLUME /tmp | |
| # see https://devcenter.heroku.com/articles/exec#enabling-docker-support | |
| RUN apk add --no-cache curl bash openssh python | |
| ADD src/main/docker/heroku-exec.sh /app/.profile.d/heroku-exec.sh | |
| RUN chmod a+x /app/.profile.d/heroku-exec.sh | |
| ADD src/main/docker/sh-wrapper.sh /bin/sh-wrapper.sh | |
| RUN chmod a+x /bin/sh-wrapper.sh | |
| RUN rm /bin/sh && ln -s /bin/sh-wrapper.sh /bin/sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # see https://devcenter.heroku.com/articles/exec#enabling-docker-support | |
| [ -z "$SSH_CLIENT" ] && source <(curl --fail --retry 3 -sSL "$HEROKU_EXEC_URL") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| /bin/bash "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment