From 2be46d05473a7dcaa57f125b25d3388c6c87146e Mon Sep 17 00:00:00 2001 From: jan iversen Date: Wed, 21 Jun 2023 17:29:00 +0200 Subject: [PATCH] Remove docker (lack of maintenance). (#1623) --- .github/workflows/docker-publish.yml | 58 -------------------- Dockerfile | 14 ----- README.rst | 82 ---------------------------- pymodbus/repl/client/README.md | 3 - pymodbus/repl/server/README.md | 6 -- 5 files changed, 163 deletions(-) delete mode 100644 .github/workflows/docker-publish.yml delete mode 100644 Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index e345c7fdb..000000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Docker - -on: - push: - branches: - - dev - - master - tags: - - v* - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install cosign - uses: sigstore/cosign-installer@main - - - name: Check cosign install - run: cosign version - - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 - - - name: Login ghcr.io - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v4 - with: - images: ghcr.io/${{ github.repository }} - - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v3 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - -# - name: Sign the published Docker image -# env: -# COSIGN_EXPERIMENTAL: "true" -# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 96f942ec3..000000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# syntax=docker/dockerfile:1 - -FROM python:3.9-slim-buster - -WORKDIR /pymodbus - -EXPOSE 8080 -EXPOSE 5020 - -COPY . . - -RUN pip3 install -r requirements.txt && pip3 install -e . - -CMD [ "pymodbus.server", "--host", "127.0.0.1", "--web-port", "8080", "--no-repl", "run", "--modbus-port", "5020", "--modbus-server", "tcp" ] diff --git a/README.rst b/README.rst index 14cfd8f7a..2a2488b3c 100644 --- a/README.rst +++ b/README.rst @@ -240,88 +240,6 @@ If a maintenance release of an old version is needed (e.g. v2.5.4), the release tag is used to create a branch with the same name, and maintenance development is merged here. ------------------------------------------------------------ -Install with Docker ------------------------------------------------------------ -Pull the latest image on ``dev`` branch with ``docker pull ghcr.io/pymodbus-dev/pymodbus:dev``:: - - ❯ docker pull ghcr.io/pymodbus-dev/pymodbus:dev - dev: Pulling from pymodbus-dev/pymodbus - 548fcab5fe88: Pull complete - a4d3f9f008ef: Pull complete - eb83acb05730: Pull complete - 71cd28d529fd: Pull complete - 66607ad8f4f0: Pull complete - 64dff4c66d3b: Pull complete - 8b26e5718a7a: Pull complete - dc87d8707532: Pull complete - Digest: sha256:cfeee09a87dde5863574779416490fd47cacbb6f37332a3cdaf995c416e16b69 - Status: Downloaded newer image for ghcr.io/pymodbus-dev/pymodbus:dev - ghcr.io/pymodbus-dev/pymodbus:dev - -The image when run with out any further options supplied will start a repl server in non interactive mode.:: - - ❯ docker run -it --rm -p 8080:8080 -p 5020:5020 ghcr.io/pymodbus-dev/pymodbus:dev - - Reactive Modbus Server started. - ======== Running on http://127.0.0.1:8080 ======== - - =========================================================================== - Example Usage: - curl -X POST http://127.0.0.1:8080 -d "{"response_type": "error", "error_code": 4}" - =========================================================================== - -The default command can be overridden by passing any valid command at the end.:: - - ❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "pymodbus.server --help" - - Usage: pymodbus.server [OPTIONS] COMMAND [ARGS]... - - Reactive Modbus server - - ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ - │ --host TEXT Host address [default: localhost] │ - │ --web-port INTEGER Web app port [default: 8080] │ - │ -b Support broadcast messages │ - │ --repl --no-repl Enable/Disable repl for server [default: repl] │ - │ --verbose --no-verbose Run with debug logs enabled for pymodbus [default: no-verbose] │ - │ --install-completion Install completion for the current shell. │ - │ --show-completion Show completion for the current shell, to copy it or customize the │ - │ installation. │ - │ --help Show this message and exit. │ - ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - ╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ - │ run Run Reactive Modbus server. │ - ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - -To check the repl console.:: - - ❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "pymodbus.console --help" - Usage: pymodbus.console [OPTIONS] COMMAND [ARGS]... - - Run Main. - - Options: - --version Show the version and exit. - --verbose Verbose logs - --broadcast-support Support broadcast messages - --retry-on-empty Retry on empty response - --retry-on-error Retry on error response - --retries INTEGER Retry count - --reset-socket / --no-reset-socket - Reset client socket on error - --help Show this message and exit. - - Commands: - serial Define serial communication. - tcp Define TCP. - -To run examples (assuming server is running). :: - - ❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "examples/client_async.py" - 14:52:13 INFO client_async:44 ### Create client object - 14:52:13 INFO client_async:120 ### Client starting - ------------------------------------------------------------ Current Work In Progress ------------------------------------------------------------ diff --git a/pymodbus/repl/client/README.md b/pymodbus/repl/client/README.md index 6fb332955..94000cf8b 100644 --- a/pymodbus/repl/client/README.md +++ b/pymodbus/repl/client/README.md @@ -32,9 +32,6 @@ Commands: serial tcp -# Or using a Docker run command instead - -✗ docker run -it pymodbus-dev/pymodbus pymodbus.console --help ``` TCP Options diff --git a/pymodbus/repl/server/README.md b/pymodbus/repl/server/README.md index 5b408276e..b2068d18a 100644 --- a/pymodbus/repl/server/README.md +++ b/pymodbus/repl/server/README.md @@ -46,12 +46,6 @@ Invoke REPL server with `pymodbus.server run` command. ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` -If using the docker image, you can run all the same commands, prepending the `docker run` command. For example: - -```shell -docker run -it pymodbus-dev/pymodbus pymodbus.server --help -``` - ```shell ✗ pymodbus.server run --help