diff options
author | Anton Titov <[email protected]> | 2019-12-25 11:30:27 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-25 11:30:27 +0300 |
commit | f01a1485be61d1eec2a751c73a0251a1d4d17388 (patch) | |
tree | 1940c5f5239fa83fd7a5558cc162dfc677965178 | |
parent | da1d47e290b593d00c65140cc6036f5ea34e7dd3 (diff) | |
parent | 3506812078eea46b795dd0edd96df9f4586026df (diff) |
Merge pull request #219 from tarampampam/master
RR binary in Docker
-rw-r--r-- | .dockerignore | 9 | ||||
-rw-r--r-- | .github/workflows/ci-build.yml | 15 | ||||
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | Dockerfile | 29 | ||||
-rw-r--r-- | README.md | 2 |
5 files changed, 59 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..9bfb38f4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.dockerignore +.git +.gitignore +.editorconfig +.github +/src +/tests +/bin +composer.json diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3031cbb4..360c4f30 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -89,3 +89,18 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} if: + + image: + name: Build docker image + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Build image + run: docker build -t rr:local -f Dockerfile . + + - name: Try to execute + run: docker run --rm rr:local -v diff --git a/CHANGELOG.md b/CHANGELOG.md index 4518530b..5c8d9804 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +UNRELEASED +---------- +- added `Dockerfile` for building RR binary file by [@tarampampam](https://github.com/tarampampam) (closes [issue #218](https://github.com/spiral/roadrunner/issues/218)) + v1.5.3 (23.12.2019) ------------------- - metric and RPC ports are rotated in tests to avoid false positive diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..4ea56dc3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +# Image page: <https://hub.docker.com/_/golang> +FROM golang:1.12-alpine as builder + +COPY . /src + +WORKDIR /src + +RUN set -x \ + && apk add --no-cache bash git \ + && go version \ + && bash ./build.sh \ + && ./rr -v \ + && test -f ./.rr.yaml + +FROM alpine:latest + +LABEL \ + org.label-schema.name="roadrunner" \ + org.label-schema.description="High-performance PHP application server, load-balancer and process manager" \ + org.label-schema.url="https://github.com/spiral/roadrunner" \ + org.label-schema.vcs-url="https://github.com/spiral/roadrunner" \ + org.label-schema.vendor="SpiralScout" \ + org.label-schema.license="MIT" \ + org.label-schema.schema-version="1.0" + +COPY --from=builder /src/rr /usr/bin/rr +COPY --from=builder /src/.rr.yaml /etc/rr.yaml + +ENTRYPOINT ["/usr/bin/rr"] @@ -56,6 +56,8 @@ $ composer require spiral/roadrunner $ ./vendor/bin/rr get-binary ``` +> For getting roadrunner binary file you can use our docker image: `spiral/roadrunner:X.X.X` (more information about image and tags can be found [here](https://hub.docker.com/r/spiral/roadrunner/)) + Example: -------- |