|
1 | | -# smee-client image |
2 | | -A minimal, secure docker image for [probot/smee-client](https://github.com/probot/smee-client). |
| 1 | +# `smee-client` Image |
| 2 | + |
| 3 | +[](https://github.com/amplify-security/smee-client-image/actions/workflows/amplify.yml) |
| 4 | +[](https://github.com/amplify-security/amplify-security/actions/workflows/release.yml) |
| 5 | +[](https://hub.docker.com/r/amplifysecurity/smee-client) |
| 6 | +[](https://hub.docker.com/r/amplifysecurity/smee-client) |
| 7 | +[](https://hub.docker.com/r/amplifysecurity/smee-client/tags) |
| 8 | + |
| 9 | +A minimal, secure docker image for [probot/smee-client](https://github.com/probot/smee-client). Currently, the |
| 10 | +[`amplifysecurity/smee-client`](https://hub.docker.com/r/amplifysecurity/smee-client) |
| 11 | +image size is under 93MB uncompressed. |
| 12 | + |
| 13 | +## How to use this image |
| 14 | + |
| 15 | +### Run `smee-client` using docker run |
| 16 | + |
| 17 | +Running the image with no parameters will print the `smee-client` help message: |
| 18 | + |
| 19 | +``` |
| 20 | +$ docker run --rm amplifysecurity/smee-client |
| 21 | +Usage: smee [options] |
| 22 | +
|
| 23 | +Options: |
| 24 | + -v, --version output the version number |
| 25 | + -u, --url <url> URL of the webhook proxy service. Default: |
| 26 | + https://smee.io/new |
| 27 | + -t, --target <target> Full URL (including protocol and path) of the target |
| 28 | + service the events will forwarded to. Default: |
| 29 | + http://127.0.0.1:PORT/PATH |
| 30 | + -p, --port <n> Local HTTP server port (default: 3000) |
| 31 | + -P, --path <path> URL path to post proxied requests to` (default: "/") |
| 32 | + -h, --help display help for command |
| 33 | +``` |
| 34 | + |
| 35 | +Use the `-u` and `-t` parameters to connect to your [Smee.io](https://smee.io/) channel and forward |
| 36 | +events to your local target. |
| 37 | + |
| 38 | +``` |
| 39 | +$ docker run --rm amplifysecurity/smee-client -u $SMEE_URL -t http://localhost:8080/webhook |
| 40 | +Forwarding https://smee.io/******** to http://localhost:8080/webhook |
| 41 | +Connected https://smee.io/******** |
| 42 | +``` |
| 43 | + |
| 44 | +### Run `smee-client` using docker compose |
| 45 | + |
| 46 | +To use the image in docker compose, ensure that the smee service is linked to your receiving service. |
| 47 | +This image also specifies a non-root user (UID 1000) and so can be run with `no-new-privileges:true`. |
| 48 | + |
| 49 | +```yaml |
| 50 | +services: |
| 51 | + smee: |
| 52 | + image: amplifysecurity/smee-client |
| 53 | + links: |
| 54 | + - api:api |
| 55 | + command: -u https://smee.io/******** -t http://api:8080/webhook |
| 56 | + security_opt: |
| 57 | + - no-new-privileges:true |
| 58 | + api: |
| 59 | + build: |
| 60 | + context: . |
| 61 | + ports: |
| 62 | + - "8080:8080" |
| 63 | +``` |
| 64 | +
|
| 65 | +## Inspiration |
| 66 | +
|
| 67 | +This project was inspired by [deltaprojects/smee-client-docker](https://github.com/deltaprojects/smee-client-docker), |
| 68 | +which we have used in the past. However, this project was seemingly no longer maintained, and included several high-severity |
| 69 | +security issues. We plan to maintain this image by keeping up to date with upstream `smee-client` releases and security |
| 70 | +patches. |
0 commit comments