├── .dockerignore ├── .github └── workflows │ └── publish-docker.yml ├── .gitlab-ci.yml ├── .travis.yml ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── _archive ├── Dockerfile.cosmic ├── Dockerfile.disco ├── Dockerfile.precise ├── Dockerfile.stretch ├── Dockerfile.trusty └── Dockerfile.xenial ├── bionic └── Dockerfile ├── bookworm └── Dockerfile ├── build_all_flavors.sh ├── build_all_images.sh ├── build_onload_image.rb ├── bullseye └── Dockerfile ├── buster └── Dockerfile ├── centos7 └── Dockerfile ├── centos8 └── Dockerfile ├── docker_build_and_push_flavor.sh ├── focal └── Dockerfile ├── gen_gitlab_yml.rb ├── jammy └── Dockerfile └── noble └── Dockerfile /.dockerignore: -------------------------------------------------------------------------------- 1 | # .dockerignore 2 | # Copyright (c) 2021 Neomantra BV 3 | 4 | .travis.yml 5 | 6 | .gitlab-ci.yml 7 | onload-gitlab-ci.yml 8 | flavors-to-build.txt 9 | -------------------------------------------------------------------------------- /.github/workflows/publish-docker.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker image 2 | 3 | on: 4 | push: 5 | 6 | env: 7 | DOCKER_ORG: ${{ secrets.DOCKER_ORG }} 8 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 9 | DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} 10 | 11 | jobs: 12 | build-cento8: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Check out the repo 16 | uses: actions/checkout@v4 17 | - name: Login to Docker Hub 18 | uses: docker/login-action@v3 19 | with: 20 | username: ${{ secrets.DOCKER_USERNAME }} 21 | password: ${{ secrets.DOCKER_TOKEN }} 22 | - name: Build docker image for flavor centos8 (onload) 23 | run: ./docker_build_and_push_flavor.sh centos8 centos8/Dockerfile 24 | - name: Build docker image for flavor centos8 (onloadzf) 25 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh centos8 centos8/Dockerfile --build-arg ONLOAD_WITHZF=1 26 | 27 | build-buster: 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Check out the repo 31 | uses: actions/checkout@v4 32 | - name: Login to Docker Hub 33 | uses: docker/login-action@v3 34 | with: 35 | username: ${{ secrets.DOCKER_USERNAME }} 36 | password: ${{ secrets.DOCKER_TOKEN }} 37 | - name: Build docker image for flavor buster (onload) 38 | run: ./docker_build_and_push_flavor.sh buster buster/Dockerfile 39 | - name: Build docker image for flavor buster (onloadzf) 40 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh buster buster/Dockerfile --build-arg ONLOAD_WITHZF=1 41 | 42 | build-bookworm: 43 | runs-on: ubuntu-latest 44 | steps: 45 | - name: Check out the repo 46 | uses: actions/checkout@v4 47 | - name: Login to Docker Hub 48 | uses: docker/login-action@v3 49 | with: 50 | username: ${{ secrets.DOCKER_USERNAME }} 51 | password: ${{ secrets.DOCKER_TOKEN }} 52 | - name: Build docker image for flavor bookworm (onload) 53 | run: ./docker_build_and_push_flavor.sh bookworm bookworm/Dockerfile 54 | - name: Build docker image for flavor bookworm (onloadzf) 55 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh bookworm bookworm/Dockerfile --build-arg ONLOAD_WITHZF=1 56 | 57 | build-bullseye: 58 | runs-on: ubuntu-latest 59 | steps: 60 | - name: Check out the repo 61 | uses: actions/checkout@v4 62 | - name: Login to Docker Hub 63 | uses: docker/login-action@v3 64 | with: 65 | username: ${{ secrets.DOCKER_USERNAME }} 66 | password: ${{ secrets.DOCKER_TOKEN }} 67 | - name: Build docker image for flavor bullseye (onload) 68 | run: ./docker_build_and_push_flavor.sh bullseye bullseye/Dockerfile 69 | - name: Build docker image for flavor bullseye (onloadzf) 70 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh bullseye bullseye/Dockerfile --build-arg ONLOAD_WITHZF=1 71 | 72 | build-bionic: 73 | runs-on: ubuntu-latest 74 | steps: 75 | - name: Check out the repo 76 | uses: actions/checkout@v4 77 | - name: Login to Docker Hub 78 | uses: docker/login-action@v3 79 | with: 80 | username: ${{ secrets.DOCKER_USERNAME }} 81 | password: ${{ secrets.DOCKER_TOKEN }} 82 | - name: Build docker image for flavor bionic (onload) 83 | run: ./docker_build_and_push_flavor.sh bionic bionic/Dockerfile 84 | - name: Build docker image for flavor bionic (onloadzf) 85 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh bionic bionic/Dockerfile --build-arg ONLOAD_WITHZF=1 86 | 87 | build-focal: 88 | runs-on: ubuntu-latest 89 | steps: 90 | - name: Check out the repo 91 | uses: actions/checkout@v4 92 | - name: Login to Docker Hub 93 | uses: docker/login-action@v3 94 | with: 95 | username: ${{ secrets.DOCKER_USERNAME }} 96 | password: ${{ secrets.DOCKER_TOKEN }} 97 | - name: Build docker image for flavor focal (onload) 98 | run: ./docker_build_and_push_flavor.sh focal focal/Dockerfile 99 | - name: Build docker image for flavor focal (onloadzf) 100 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh focal focal/Dockerfile --build-arg ONLOAD_WITHZF=1 101 | 102 | build-jammy: 103 | runs-on: ubuntu-latest 104 | steps: 105 | - name: Check out the repo 106 | uses: actions/checkout@v4 107 | - name: Login to Docker Hub 108 | uses: docker/login-action@v3 109 | with: 110 | username: ${{ secrets.DOCKER_USERNAME }} 111 | password: ${{ secrets.DOCKER_TOKEN }} 112 | - name: Build docker image for flavor jammy (onload) 113 | run: ./docker_build_and_push_flavor.sh jammy jammy/Dockerfile 114 | - name: Build docker image for flavor jammy (onloadzf) 115 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh jammy jammy/Dockerfile --build-arg ONLOAD_WITHZF=1 116 | 117 | build-noble: 118 | runs-on: ubuntu-latest 119 | steps: 120 | - name: Check out the repo 121 | uses: actions/checkout@v4 122 | - name: Login to Docker Hub 123 | uses: docker/login-action@v3 124 | with: 125 | username: ${{ secrets.DOCKER_USERNAME }} 126 | password: ${{ secrets.DOCKER_TOKEN }} 127 | - name: Build docker image for flavor noble (onload) 128 | run: ./docker_build_and_push_flavor.sh noble noble/Dockerfile 129 | - name: Build docker image for flavor noble (onloadzf) 130 | run: IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh noble noble/Dockerfile --build-arg ONLOAD_WITHZF=1 131 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # docker-onload GitLab CI/CD 2 | # Copyright (c) 2020 Neomantra BV 3 | 4 | image: docker:latest 5 | 6 | stages: 7 | - setup 8 | - triggers 9 | - build 10 | 11 | variables: 12 | GIT_SUBMODULE_STRATEGY: recursive 13 | DOCKER_DRIVER: overlay2 14 | DOCKER_TLS_CERTDIR: "" 15 | 16 | before_script: 17 | - apk add --update ruby 18 | 19 | 20 | ############################################################################################### 21 | # Images 22 | ############################################################################################### 23 | 24 | master-build-setup: 25 | stage: setup 26 | only: 27 | - master 28 | script: 29 | - ./gen_gitlab_yml.rb --template --zf -o $ONLOAD_VERSION -p "$CI_REGISTRY_IMAGE:" > onload-gitlab-ci.yml 30 | artifacts: 31 | paths: 32 | - onload-gitlab-ci.yml 33 | variables: 34 | ONLOAD_VERSION: latest 35 | 36 | master-build-triggers: 37 | stage: triggers 38 | only: 39 | - master 40 | trigger: 41 | strategy: depend 42 | include: 43 | - artifact: onload-gitlab-ci.yml 44 | job: master-build-setup 45 | 46 | 47 | tag-build-setup: 48 | stage: setup 49 | only: 50 | - tags 51 | script: 52 | - ./gen_gitlab_yml.rb --template --zf -o $ONLOAD_VERSION -p "$CI_REGISTRY_IMAGE:" > onload-gitlab-ci.yml 53 | artifacts: 54 | paths: 55 | - onload-gitlab-ci.yml 56 | variables: 57 | ONLOAD_VERSION: $CI_COMMIT_TAG 58 | 59 | tag-build-triggers: 60 | stage: triggers 61 | only: 62 | - tags 63 | trigger: 64 | strategy: depend 65 | include: 66 | - artifact: onload-gitlab-ci.yml 67 | job: tag-build-setup 68 | 69 | 70 | branch-build-setup: 71 | stage: setup 72 | only: 73 | - branches 74 | script: 75 | - ./gen_gitlab_yml.rb --template --zf -o $ONLOAD_VERSION -p "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-" > onload-gitlab-ci.yml 76 | artifacts: 77 | paths: 78 | - onload-gitlab-ci.yml 79 | variables: 80 | ONLOAD_VERSION: latest 81 | 82 | branch-build-triggers: 83 | stage: triggers 84 | only: 85 | - branches 86 | trigger: 87 | strategy: depend 88 | include: 89 | - artifact: onload-gitlab-ci.yml 90 | job: branch-build-setup 91 | 92 | 93 | build-all-setup: 94 | stage: setup 95 | rules: 96 | - if: '$BUILD == "ALL"' 97 | when: manual 98 | environment: 99 | name: production 100 | script: 101 | - | 102 | ./gen_gitlab_yml.rb --template > onload-gitlab-ci.yml 103 | for OOVERSION in $(./build_onload_image.rb --versions) ; do 104 | ./gen_gitlab_yml.rb --zf -o $OOVERSION -p "$CI_REGISTRY_IMAGE:" >> onload-gitlab-ci.yml 105 | done 106 | artifacts: 107 | paths: 108 | - onload-gitlab-ci.yml 109 | 110 | build-all-triggers: 111 | stage: triggers 112 | rules: 113 | - if: '$BUILD == "ALL"' 114 | when: manual 115 | trigger: 116 | strategy: depend 117 | include: 118 | - artifact: onload-gitlab-ci.yml 119 | job: build-all-setup 120 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # docker-onload .travis.yml 2 | # 3 | # Builds docker-onload images on Travis CI 4 | # 5 | # https://travis-ci.com/neomantra/docker-onload 6 | # 7 | # Master will build with Docker tag: 8 | # neomantra/onload: 9 | # neomantra/onloadzf: 10 | # 11 | # Releases should be tagged in git as: 12 | # neomantra/onload:- 13 | # neomantra/onloadzf:- 14 | # 15 | # Travis Environment Variables: 16 | # DOCKER_ORG 17 | # DOCKER_USERNAME 18 | # DOCKER_PASSWORD 19 | # 20 | 21 | os: linux 22 | dist: focal 23 | language: ruby 24 | 25 | sudo: required 26 | 27 | services: 28 | - docker 29 | 30 | env: 31 | - DOCKER_PASSFILE=/tmp/docker.pass 32 | 33 | before_script: 34 | - echo $DOCKER_PASSWORD > /tmp/docker.pass 35 | 36 | jobs: 37 | include: 38 | - stage: build docker image for flavor centos7 (onload) 39 | script: 40 | - ./docker_build_and_push_flavor.sh centos7 centos7/Dockerfile 41 | 42 | - stage: build docker image for flavor centos7 (onloadzf) 43 | script: 44 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh centos7 centos7/Dockerfile --build-arg ONLOAD_WITHZF=1 45 | 46 | - stage: build docker image for flavor centos8 (onload) 47 | script: 48 | - ./docker_build_and_push_flavor.sh centos8 centos8/Dockerfile 49 | 50 | - stage: build docker image for flavor centos8 (onloadzf) 51 | script: 52 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh centos8 centos8/Dockerfile --build-arg ONLOAD_WITHZF=1 53 | 54 | - stage: build docker image for flavor buster (onload) 55 | script: 56 | - ./docker_build_and_push_flavor.sh buster buster/Dockerfile 57 | 58 | - stage: build docker image for flavor buster (onloadzf) 59 | script: 60 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh buster buster/Dockerfile --build-arg ONLOAD_WITHZF=1 61 | 62 | - stage: build docker image for flavor bookworm (onload) 63 | script: 64 | - ./docker_build_and_push_flavor.sh bookworm bookworm/Dockerfile 65 | 66 | - stage: build docker image for flavor bookworm (onloadzf) 67 | script: 68 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh bookworm bookworm/Dockerfile --build-arg ONLOAD_WITHZF=1 69 | 70 | - stage: build docker image for flavor bionic (onload) 71 | script: 72 | - ./docker_build_and_push_flavor.sh bionic bionic/Dockerfile 73 | 74 | - stage: build docker image for flavor bionic (onloadzf) 75 | script: 76 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh bionic bionic/Dockerfile --build-arg ONLOAD_WITHZF=1 77 | 78 | - stage: build docker image for flavor focal (onload) 79 | script: 80 | - ./docker_build_and_push_flavor.sh focal focal/Dockerfile 81 | 82 | - stage: build docker image for flavor focal (onloadzf) 83 | script: 84 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh focal focal/Dockerfile --build-arg ONLOAD_WITHZF=1 85 | 86 | - stage: build docker image for flavor jammy (onload) 87 | script: 88 | - ./docker_build_and_push_flavor.sh jammy jammy/Dockerfile 89 | 90 | - stage: build docker image for flavor jammy (onloadzf) 91 | script: 92 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh jammy jammy/Dockerfile --build-arg ONLOAD_WITHZF=1 93 | 94 | - stage: build docker image for flavor noble (onload) 95 | script: 96 | - ./docker_build_and_push_flavor.sh noble noble/Dockerfile 97 | 98 | - stage: build docker image for flavor noble (onloadzf) 99 | script: 100 | - IMAGE_NAME="onloadzf" ./docker_build_and_push_flavor.sh noble noble/Dockerfile --build-arg ONLOAD_WITHZF=1 101 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # docker-onload CHANGELOG 2 | 3 | ## 2024-06-29 (tagged 8.1.3.40) 4 | 5 | * Update to Onload 8.1.3.40 6 | * Add Ubuntu `noble` flavor 7 | * Images are now built with [GitHub Actions](https://github.com/neomantra/docker-onload/actions) 8 | * `bullseye` flavor is now built by Github Actions 9 | 10 | ## 2024-01-17 (tagged 8.1.2.26) 11 | 12 | * Update to Onload 8.1.2.26 13 | 14 | ## 2023-11-14 (tagged 8.1.1.17) 15 | 16 | * Update to Onload 8.1.1.17 17 | 18 | ## 2023-11-14 (tagged 8.1.0.15) 19 | 20 | * Update to Onload 8.1.0.15 21 | 22 | ## 2022-05-08 (tagged 7.1.3.202) 23 | 24 | * Migrate to latest downloads at Xilinx Support 25 | * Add Ubuntu `jammy` flavor 26 | 27 | ## 2022-03-30 28 | 29 | * Update to Onload 7.1.3.202 (#8) 30 | * `centos8` image (from EOL Centos 8) now uses yum repo http://vault.centos.org 31 | 32 | ## 2021-07-12 (tagged 7.1.2.141) 33 | 34 | * Update to Onload 7.1.2.141 35 | * Add `bullseye` image to automated build as it can now be built from release. 36 | 37 | ## 2021-05-21 (untagged) 38 | 39 | * Add `bullseye` flavor which can be built from Git. 40 | There is no automated build for it. 41 | 42 | ## 2021-05-09 (tagged 7.1.1.75) 43 | 44 | * Update to Onload 7.1.1.75 45 | * Only build 64-bit userspace components (no 32-bit applications) 46 | * `focal` flavor builds with GCC 10 47 | * Archive `precise` flavor 48 | * Travis build with `docker_build_and_push_flavor.sh` 49 | * Move to travis-ci.com 50 | 51 | ## 2020-10-31 (tagged 7.1.0.265) 52 | 53 | * Add `centos8` flavor 54 | * Rename `centos` to `centos7` 55 | * Update to Solarflare download URLs 56 | * Fix broken args in `build_all_images.sh` 57 | 58 | ## 2020-05-06 (tagged 7.1.0.265) 59 | 60 | * Update to Onload 7.1.0.265 61 | 62 | ## 2020-04-23 (tagged 7.0.0.176) 63 | 64 | * Remove Ubuntu `disco` flavor (end of life) 65 | * Move stale Dockerfiles to `_archive` folder 66 | 67 | ## 2020-04-12 (tagged 7.0.0.176) 68 | 69 | * Add Ubuntu `focal` flavor. 70 | * Remove Ubuntu `cosmic` flavor (end of life) 71 | 72 | ## 2020-02-12 (tagged 7.0.0.176) 73 | 74 | * Add Solarflare upstream ONLOAD_PACKAGE_URL 75 | * Add Debian `buster` flavor, derived from `buster-slim` 76 | * Add `build_onload_image.rb` helper script 77 | 78 | ## 2020-02-07 79 | 80 | * Update to OpenOnload 7.0.0.176 (#3) 81 | * Support building from new OpenOnload packaging with ONLOAD_PACKAGE_URL 82 | * Add ONLOAD_LEGACY_URL build arg 83 | 84 | ## 2019-07-04 (tagged 201811-u1) 85 | 86 | * Update to OpenOnload 201811-u1 87 | * Add Ubuntu Disco image 88 | 89 | ## 2019-07-04 (tagged 201811) 90 | 91 | * Fix quoting for ONLOAD_DISABLE_SYSCALL_HOOK and ONLOAD_USERSPACE_ID test 92 | 93 | ## 2019-06-21 94 | 95 | * Add ONLOAD_DISABLE_SYSCALL_HOOK build-arg 96 | * Add ONLOAD_USERSPACE_ID build-arg 97 | * Update docs 98 | * Add Docker image labels 99 | 100 | ## 2019-01-16 101 | 102 | * Fixup Centos Dockerfile to support centos:6 (#1, #2) 103 | 104 | ## 2018-12-03 105 | 106 | * Update to OpenOnload 201811 107 | * Remove -k from curl and use https since openonload.org now supports SSL 108 | 109 | ## 2018-10-23 110 | 111 | * Add Ubuntu Cosmic image 112 | * Pass -k to curl because openonload.org doesn't support SSL 113 | * Travis builds! 114 | 115 | ## 2018-08-31 116 | 117 | * Update to OpenOnload 201805-u1 118 | 119 | ## 2018-05-09 120 | 121 | * Update to OpenOnload 201805 122 | 123 | ## 2018-04-26 124 | 125 | * Add Ubuntu Bionic image, with patched OpenOnload 201710-u1.1 126 | 127 | ## 2018-04-23 128 | 129 | * Update to OpenOnload 201710-u1.1 130 | 131 | ## 2018-01-23 132 | 133 | * Update to OpenOnload 201710-u1 134 | * Add Debian Stretch images, derived from `stretch-slim` 135 | 136 | ## 2017-12-26 137 | 138 | * Parameterize `FROM` stanzas with `ONLOAD_CENTOS_BASE` and `ONLOAD_DEBIAN_BASE` 139 | * Manage TCPDirect using build-arg `ONLOAD_WITHZF` instead of separate Dockerfiles 140 | * Remove all the `Dockerfile.nozf` files 141 | 142 | ## 2017-10-10 143 | 144 | * Update to OpenOnload 201710 145 | 146 | ## 2017-06-28 147 | 148 | * Update to OpenOnload 201606-u1.3 149 | * Xenial builds need `libtool-bin` package 150 | 151 | ## 2017-03-21 152 | 153 | * Update to OpenOnload 201606-u1.2 154 | 155 | ## 2017-02-02 156 | 157 | * Update to OpenOnload 201606-u1.1 158 | * Add note about `EF_USE_HUGE_PAGES=0` 159 | 160 | ## 2017-01-18 161 | 162 | * Add Dockerfile.nozf for Docker Hub builds 163 | * Add TCPDirect notes 164 | * Add docs about onload_cplane in Dockerfiles 165 | * Added `CHANGELOG.md` 166 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2024 Neomantra BV 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-onload 2 | 3 | [![GitHub Docker Build Action](https://github.com/neomantra/docker-onload/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/neomantra/docker-onload/actions/workflows/publish-docker.yml) 4 | 5 | `docker-onload` provides a Dockerfile which installs Solarflare's [OpenOnload](https://github.com/Xilinx-CNS/onload) into various OS flavors. Find it on the Docker Hub: https://hub.docker.com/r/neomantra/onload/ 6 | 7 | See changes in the [CHANGELOG](https://github.com/neomantra/docker-onload/blob/master/CHANGELOG.md). 8 | 9 | The `onload` image is built with `ONLOAD_WITHZF` set, thus without support for [TCPDirect](#tcpdirect) (aka ZF). This is due to licensing restrictions. 10 | 11 | ---- 12 | 13 | ## Supported Docker Hub tags for image `neomantra/onload` and respective `Dockerfile` links 14 | 15 | These unversioned image tags currently map to **7.1.3.202**: 16 | 17 | - [`centos7` (*centos7/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/centos7/Dockerfile) 18 | - [`centos8` (*centos8/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/centos8/Dockerfile) 19 | - [`stretch` (*stretch/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/stretch/Dockerfile) 20 | - [`buster` (*buster/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/buster/Dockerfile) 21 | - [`trusty` (*trusty/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/trusty/Dockerfile) 22 | - [`xenial` (*xenial/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/xenial/Dockerfile) 23 | - [`bionic` (*bionic/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/bionic/Dockerfile) 24 | - [`focal` (*focal/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/focal/Dockerfile) 25 | - [`jammy` (*jammy/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/jammy/Dockerfile) 26 | - [`noble` (*noble/Dockerfile*)](https://github.com/neomantra/docker-onload/blob/master/noble/Dockerfile) 27 | 28 | The following versioned tags are available: 29 | - **8.1.3.40** 30 | - **8.1.2.26** 31 | - **8.1.1.17** 32 | - **8.1.0.15** 33 | - For **7.1.3.202** 34 | - `7.1.3.202-bionic` 35 | - `7.1.3.202-bullseye` 36 | - `7.1.3.202-buster` 37 | - `7.1.3.202-centos7` 38 | - `7.1.3.202-centos8` 39 | - `7.1.3.202-focal` 40 | - `7.1.3.202-jammy` 41 | - `7.1.3.202-stretch` 42 | - `7.1.3.202-trusty` 43 | - `7.1.3.202-xenial` 44 | - For **7.1.2.141** 45 | - `7.1.2.141-bionic` 46 | - `7.1.2.141-bullseye` 47 | - `7.1.2.141-buster` 48 | - `7.1.2.141-centos7` 49 | - `7.1.2.141-centos8` 50 | - `7.1.2.141-focal` 51 | - `7.1.2.141-jammy` 52 | - `7.1.2.141-stretch` 53 | - `7.1.2.141-trusty` 54 | - `7.1.2.141-xenial` 55 | 56 |
57 | Older Tags 58 | 59 | - `7.1.0.265-centos7-nozf` 60 | - `7.1.0.265-centos8-nozf` 61 | - `7.1.0.265-precise-nozf` 62 | - `7.1.0.265-trusty-nozf` 63 | - `7.1.0.265-stretch-nozf` 64 | - `7.1.0.265-xenial-nozf` 65 | - `7.1.0.265-bionic-nozf` 66 | - `7.1.0.265-cosmic-nozf` 67 | - `7.1.0.265-disco-nozf` 68 | - `7.1.0.265-focal-nozf` 69 | - `7.1.0.265-buster-nozf` 70 | - `7.0.0.176-centos-nozf` 71 | - `7.0.0.176-precise-nozf` 72 | - `7.0.0.176-trusty-nozf` 73 | - `7.0.0.176-stretch-nozf` 74 | - `7.0.0.176-xenial-nozf` 75 | - `7.0.0.176-bionic-nozf` 76 | - `7.0.0.176-cosmic-nozf` 77 | - `7.0.0.176-disco-nozf` 78 | - `7.0.0.176-focal-nozf` 79 | - `7.0.0.176-buster-nozf` 80 | - `201811-u1-centos-nozf` 81 | - `201811-u1-precise-nozf` 82 | - `201811-u1-trusty-nozf` 83 | - `201811-u1-stretch-nozf` 84 | - `201811-u1-xenial-nozf` 85 | - `201811-u1-bionic-nozf` 86 | - `201811-u1-cosmic-nozf` 87 | - `201811-u1-disco-nozf` 88 | - `201811-centos-nozf` 89 | - `201811-precise-nozf` 90 | - `201811-trusty-nozf` 91 | - `201811-stretch-nozf` 92 | - `201811-xenial-nozf` 93 | - `201811-bionic-nozf` 94 | - `201811-cosmic-nozf` 95 | - `201805-u1-centos-nozf` 96 | - `201805-u1-precise-nozf` 97 | - `201805-u1-trusty-nozf` 98 | - `201805-u1-stretch-nozf` 99 | - `201805-u1-xenial-nozf` 100 | - `201805-u1-bionic-nozf` 101 | - `201805-u1-cosmic-nozf` 102 | - `201805-centos-nozf` 103 | - `201805-precise-nozf` 104 | - `201805-trusty-nozf` 105 | - `201805-stretch-nozf` 106 | - `201805-xenial-nozf` 107 | - `201805-bionic-nozf` 108 | - `201710-u1.1-centos-nozf` 109 | - `201710-u1.1-precise-nozf` 110 | - `201710-u1.1-trusty-nozf` 111 | - `201710-u1.1-stretch-nozf` 112 | - `201710-u1.1-xenial-nozf` 113 | - `201710-u1.1-bionic-nozf` 114 | - `201710-u1-centos-nozf` 115 | - `201710-u1-precise-nozf` 116 | - `201710-u1-trusty-nozf` 117 | - `201710-u1-stretch-nozf` 118 | - `201710-u1-xenial-nozf` 119 | - `201710-centos-nozf` 120 | - `201710-precise-nozf` 121 | - `201710-trusty-nozf` 122 | - `201710-stretch-nozf` 123 | - `201710-xenial-nozf` 124 | - `201606-u1.3-centos-nozf` 125 | - `201606-u1.3-precise-nozf` 126 | - `201606-u1.3-trusty-nozf` 127 | - `201606-u1.3-xenial-nozf` 128 | - `201606-u1.2-centos-nozf` 129 | - `201606-u1.2-precise-nozf` 130 | - `201606-u1.2-trusty-nozf` 131 | - `201606-u1.2-xenial-nozf` 132 | - `201606-u1.1-centos-nozf` 133 | - `201606-u1.1-precise-nozf` 134 | - `201606-u1.1-trusty-nozf` 135 | - `201606-u1.1-xenial-nozf` 136 | - `201606-u1-centos-nozf` 137 | - `201606-u1-precise-nozf` 138 | - `201606-u1-trusty-nozf` 139 | - `201606-u1-xenial-nozf` 140 | - `201606-centos` 141 | - `201606-precise` 142 | - `201606-trusty` 143 | - `201606-xenial` 144 | - `201509-u1-centos` 145 | - `201509-u1-precise` 146 | - `201509-u1-trusty` 147 | - `201509-u1-xenial` 148 | 149 |
150 |
151 | 152 | ---- 153 | 154 | ## Launching Onload-enabled containers 155 | 156 | Onload-enabled contaiers require exposing the host network and onload devices, so run like so: 157 | ``` 158 | docker run --net=host --device=/dev/onload --device=/dev/onload_epoll -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 159 | ``` 160 | 161 | The OpenOnload `201606` series also requires `--device=/dev/onload_cplane`. Using `ef_vi` or [TCPDirect](#tcpdirect) requires `--device=/dev/sfc_char`. 162 | 163 | Here's a bash one-liner for extracting the OpenOnload version year: 164 | `onload --version | awk 'NR == 1 {print substr($2, 1, 4)}'` 165 | 166 | ## Cavets 167 | 168 | * Host networking must be used: `--net=host` 169 | 170 | * The following devices must be exported: `--device=/dev/onload --device=/dev/onload_epoll`. 171 | 172 | * The OpenOnload `201606` series also requires `--device=/dev/onload_cplane`. 173 | 174 | * Using `ef_vi` or [TCPDirect](#tcpdirect) requires `--device=/dev/sfc_char`. 175 | 176 | * The host's `onload --version` must be the same as the container's. 177 | 178 | * *Stack Sharing*: If a container and the host must share an Onload stack, both should use `EF_SHARE_WITH=-1` to avoid a current limitation in OpenOnload. Note this disables the stack sharing security feature. 179 | 180 | * Due to a current limitation with OpenOnload, you should run with `EF_USE_HUGE_PAGES=0` if you share Onload stacks. 181 | 182 | * Some libraries, such as [jemalloc](http://jemalloc.net/) need to invoke syscalls at startup. This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym); see jemalloc issues [443](https://github.com/jemalloc/jemalloc/issues/443) and [1426](https://github.com/jemalloc/jemalloc/issues/1426). This can be alleviated by setting `ONLOAD_DISABLE_SYSCALL_HOOK=1`; note you will also need to set `ONLOAD_USERSPACE_ID` to match the unpatched driver version. **NOTE:** This may have been fixed in `7.0.0.176`: "SF-122792-KI/bug62297: avoid hang at app startup with jemalloc". 183 | 184 | * These OpenOnload builds default to using `-march` and `-mtune` based on the CPU-type of the build machine. This might not be optimial or runnable on your runtime platform. A future release will allow this to be specified as Docker build arguments. 185 | 186 | 187 | ## TCPDirect 188 | 189 | In OpenOnload 201606-u1, Solarflare introducted a new kernel-bypass networking API named *TCPDirect*. 190 | 191 | To run TCPDirect applications in a container, an addition device must be exported: 192 | `--device=/dev/sfc_char` 193 | 194 | TCPDirect is under a different license than OpenOnload; its binaries may not be distributed. 195 | Thus, the `onload` public image on [Docker Hub](https://hub.docker.com/r/neomantra/onload/) does not have TCPDirect 196 | support. 197 | 198 | You are free to build and deploy TCPDirect-enabled images yourself with the regular Dockerfiles. 199 | To do so, set the build argument `ONLOAD_WITHZF` to a non-empty string (the Dockerfile checks `[ -z ${ONLOAD_WITHZF} ]`). 200 | For example: 201 | 202 | ``` 203 | git clone https://github.com/neomantra/docker-onload.git 204 | cd docker-onload 205 | docker build --build-arg ONLOAD_WITHZF=1 -f xenial/Dockerfile -t neomantra/onload:201606-u1-xenial . 206 | ``` 207 | 208 | ## Image Building Helper Script 209 | 210 | The Ruby script `build_onload_image.rb` helps generate command lines for building Onload images. 211 | 212 | ``` 213 | $ ./build_onload_image.rb --help 214 | build_onload_image.rb [options] 215 | 216 | ACTIONS 217 | --versions show list of onload version name (use with -v to show all fields) 218 | --flavors show list of image flavors 219 | --gettag show the autotag name of --autotag 220 | 221 | --build show docker build command 222 | --execute execute docker build command 223 | 224 | OPTIONS 225 | --flavor -f specify build (required for --build or --execute) 226 | --onload -o specify onload to build (default is 'latest') 227 | 228 | --url -u Override URL for "packaged" versions. 229 | 230 | --tag -t tag image as 231 | --autotag -a tag image as -[-nozf]. 232 | is optional, but note without a with colon, 233 | the autotag will be a name not an image-name:tag 234 | 235 | --zf build with TCPDirect (zf) (or not, if optional is '0' or 'false') 236 | 237 | --arg pass '--build-arg ' to "docker build" 238 | 239 | --quiet -q build quietly (pass -q to "docker build") 240 | --no-cache pass --no-cache to "docker build" 241 | 242 | --execute -x also execute the build line 243 | 244 | --push -p push the built image 245 | 246 | --verbose -v verbose output 247 | --help -h show this help 248 | ``` 249 | 250 | Example usage: 251 | 252 | ``` 253 | ./build_onload_image.rb -o 7.1.1.75 --arg foo -f buster --zf --execute 254 | ``` 255 | 256 | There are also `build_all_flavors.sh` and `build_all_images.sh`. 257 | 258 | ## Customized Image Building 259 | 260 | Dockerfiles are provided for the following base systems, selecting the Dockerfile path with `-f`: 261 | 262 | * [CentOS 7](https://github.com/neomantra/docker-onload/centos7/Dockerfile) (`centos7/Dockerfile`) 263 | * [CentOS 8](https://github.com/neomantra/docker-onload/centos8/Dockerfile) (`centos8/Dockerfile`) 264 | * [Debian Stretch](https://github.com/neomantra/docker-onload/stretch/Dockerfile) (`stretch/Dockerfile`) 265 | * [Debian Buster](https://github.com/neomantra/docker-onload/buster/Dockerfile) (`buster/Dockerfile`) 266 | * [Ubuntu Trusty](https://github.com/neomantra/docker-onload/trusty/Dockerfile) (`trusty/Dockerfile`) 267 | * [Ubuntu Xenial](https://github.com/neomantra/docker-onload/xenial/Dockerfile) (`xenial/Dockerfile`) 268 | * [Ubuntu Bionic](https://github.com/neomantra/docker-onload/bionic/Dockerfile) (`bionic/Dockerfile`) 269 | * [Ubuntu Focal](https://github.com/neomantra/docker-onload/focal/Dockerfile) (`focal/Dockerfile`) 270 | * [Ubuntu Jammy](https://github.com/neomantra/docker-onload/jammy/Dockerfile) (`jammy/Dockerfile`) 271 | 272 | Each system folder has a `Dockerfile`. 273 | 274 | The following are the available build-time options. They can be set using the `--build-arg` CLI argument, like so: 275 | 276 | ``` 277 | docker build --build-arg ONLOAD_VERSION="201509" --build-arg ONLOAD_MD5SUM="b093ea9f3a534c9c9fe9da6c2b6ccb7a" -f trusty/Dockerfile . 278 | ``` 279 | 280 | The Dockerfile downloads specific versions from [openonload.org](https://openonload.org "openonload.org") using the following `ARG` settings: 281 | 282 | | Key | Default | Description | 283 | :----- | :-----: |:----------- | 284 | |ONLOAD_VERSION | "7.1.3.202" |The version of OpenOnload to download. | 285 | |ONLOAD_MD5SUM | "6153f93f03c65b4d091e9247c195b58c" |The MD5 checksum of the download. | 286 | |ONLOAD_GIT_REF | "" | If set, build from this Git Reference (currently `bullseye` only). | 287 | |ONLOAD_GIT_URL | https://github.com/Xilinx-CNS/onload.git | If building from git, which the URL of the repo to clone from | 288 | |ONLOAD_PACKAGE_URL | (see below) | If set, it will download and unzip the tarball from the newer packaging. | 289 | |ONLOAD_LEGACY_URL | (see below) | Download the OpenOnload tarball from this URL, `ONLOAD_PACKAGE_URL` has priority. | 290 | |ONLOAD_WITHZF | |Set to non-empty to include TCPDirect. | 291 | |ONLOAD_DISABLE_SYSCALL_HOOK | |Set to non-empty to disables hooking the syscall function from libc. | 292 | |ONLOAD_USERSPACE_ID | |Set to non-empty to specify the userspace build md5sum ID. | 293 | 294 | `ONLOAD_PACKAGE_URL` defaults to https://support-nic.xilinx.com/wp/onload?sd=SF-109585-LS-37&pe=SF-122921-DH-6 295 | 296 | `ONLOAD_LEGACY_URL` defaults to https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz. If you want to build from a legacy (non-packaged) URL, you must also set `ONLOAD_PACKAGE_URL` to `''` (empty string). 297 | 298 | If you change the `ONLOAD_VERSION`, you must also change `ONLOAD_MD5SUM` to match. Note that Docker is only supported by OpenOnload since version 201502. 299 | 300 | If you patch OpenOnload, you must specify `ONLOAD_USERSPACE_ID` to match the ID of the driver. It can be found in the build tree at `./build/gnu_x86_64/lib/transport/ip/uk_intf_ver.h`. The following are driver interface IDs we have recorded: 301 | 302 | | OpenOnload Version | Driver Interface ID | 303 | :----------- |:------------------- | 304 | | 8.1.3.40 | c71e5318f0cc60edbe8fb390bb778a5d | 305 | | 8.1.2.26 | 55285faa7791a719ba067d52108964c4 | 306 | | 7.1.3.202 | 278944a898989bf53d1f06e1e3397749 | 307 | | 7.1.2.141 | 1d52732765feca797791b9668b14fb4e | 308 | | 7.1.1.75 | 65869c81c4a7f92b75316cf88446a9f1 | 309 | | 7.1.0.265 | d9857bc9bddb5c6abdeb3f22d69b21d1 | 310 | | 7.0.0.176 | 6ac17472788a64c61013f3d7ed9ae4c9 | 311 | | 201811 | 357bb6508f1e324ea32da88f948efafa | 312 | | 201811-u1 | 2d850c0cd0616655dc3e31c7937acaf7 | 313 | 314 | ## Building from Onload Git repo 315 | 316 | An initial `bullseye` Dockerfile is available for building from [upstream GitHub](https://github.com/Xilinx-CNS/onload.git), rather than pre-packaged releases: 317 | 318 | ``` 319 | docker build --build-arg ONLOAD_GIT_REF=master -f bullseye/Dockerfile . 320 | ``` 321 | 322 | ## License 323 | 324 | Copyright (c) 2015-2024 Neomantra BV 325 | 326 | Released under the MIT License, see LICENSE.txt 327 | -------------------------------------------------------------------------------- /_archive/Dockerfile.cosmic: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Cosmic Cuttlefish 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Cosmic. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2020 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="cosmic" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="cosmic" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.0.0.176" 28 | ARG ONLOAD_MD5SUM="851ccf4fc76c96bcbeb01e1c57b20cce" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://support.solarflare.com/index.php/component/cognidox/?task=download&file=SF-122921-DH-1.xml&subdoc=SF-109585-LS&subissue=32&o=1&format=raw" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | coreutils \ 70 | ca-certificates \ 71 | curl \ 72 | ethtool \ 73 | gcc \ 74 | gcc-multilib \ 75 | kmod \ 76 | libc6-dev-i386 \ 77 | libpcap0.8-dev \ 78 | libtool-bin \ 79 | make \ 80 | net-tools \ 81 | patch \ 82 | perl \ 83 | python-dev \ 84 | sed \ 85 | tar \ 86 | unzip \ 87 | valgrind \ 88 | wget \ 89 | && cd /tmp \ 90 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 91 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 92 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 93 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 94 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 95 | else \ 96 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 97 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 98 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 99 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 100 | fi \ 101 | && cd /tmp/onload-${ONLOAD_VERSION} \ 102 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 103 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 104 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 105 | fi \ 106 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 107 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 108 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 109 | fi \ 110 | && cd scripts \ 111 | && ./onload_build --user \ 112 | && ./onload_install --userfiles --nobuild \ 113 | && cd /tmp \ 114 | && rm -rf onload-${ONLOAD_VERSION}* \ 115 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 116 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 117 | fi \ 118 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 119 | curl \ 120 | patch \ 121 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 122 | 123 | # TODO: which apt packages can we remove? 124 | 125 | # Labels for introspection 126 | LABEL maintainer="Evan Wies " 127 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 128 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 129 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 130 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 131 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 132 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 133 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 134 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 135 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 136 | -------------------------------------------------------------------------------- /_archive/Dockerfile.disco: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Cosmic Cuttlefish 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Cosmic. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2020 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="disco" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="disco" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.0.0.176" 28 | ARG ONLOAD_MD5SUM="851ccf4fc76c96bcbeb01e1c57b20cce" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://support.solarflare.com/index.php/component/cognidox/?task=download&file=SF-122921-DH-1.xml&subdoc=SF-109585-LS&subissue=32&o=1&format=raw" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | coreutils \ 70 | ca-certificates \ 71 | curl \ 72 | ethtool \ 73 | gcc \ 74 | gcc-multilib \ 75 | kmod \ 76 | libc6-dev-i386 \ 77 | libpcap0.8-dev \ 78 | libtool-bin \ 79 | make \ 80 | net-tools \ 81 | patch \ 82 | perl \ 83 | python-dev \ 84 | sed \ 85 | tar \ 86 | unzip \ 87 | valgrind \ 88 | wget \ 89 | && cd /tmp \ 90 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 91 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 92 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 93 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 94 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 95 | else \ 96 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 97 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 98 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 99 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 100 | fi \ 101 | && cd /tmp/onload-${ONLOAD_VERSION} \ 102 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 103 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 104 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 105 | fi \ 106 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 107 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 108 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 109 | fi \ 110 | && cd scripts \ 111 | && ./onload_build --user \ 112 | && ./onload_install --userfiles --nobuild \ 113 | && cd /tmp \ 114 | && rm -rf onload-${ONLOAD_VERSION}* \ 115 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 116 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 117 | fi \ 118 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 119 | curl \ 120 | patch \ 121 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 122 | 123 | # TODO: which apt packages can we remove? 124 | 125 | # Labels for introspection 126 | LABEL maintainer="Evan Wies " 127 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 128 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 129 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 130 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 131 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 132 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 133 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 134 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 135 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 136 | -------------------------------------------------------------------------------- /_archive/Dockerfile.precise: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Precise 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Trusty. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2020 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="precise" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="precise" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.0.265" 28 | ARG ONLOAD_MD5SUM="4db72fe198ec88d71fb1d39ef60c5ba7" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://support.solarflare.com/wp/onload?sd=SF-109585-LS-33&pe=SF-122921-DH-2" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | ca-certificates \ 70 | coreutils \ 71 | curl \ 72 | ethtool \ 73 | gcc \ 74 | gcc-multilib \ 75 | libc6-dev-i386 \ 76 | libpcap0.8-dev \ 77 | libtool \ 78 | make \ 79 | module-init-tools \ 80 | net-tools \ 81 | perl \ 82 | python-dev \ 83 | sed \ 84 | tar \ 85 | unzip \ 86 | valgrind \ 87 | wget \ 88 | && cd /tmp \ 89 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 90 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 91 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 92 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 93 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 94 | else \ 95 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 96 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 97 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 98 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 99 | fi \ 100 | && cd /tmp/onload-${ONLOAD_VERSION} \ 101 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 102 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 103 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 104 | fi \ 105 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 106 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 107 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 108 | fi \ 109 | && cd scripts \ 110 | && ./onload_build --user \ 111 | && ./onload_install --userfiles --nobuild \ 112 | && cd /tmp \ 113 | && rm -rf onload-${ONLOAD_VERSION}* \ 114 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 115 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 116 | fi \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 118 | curl \ 119 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 120 | 121 | # TODO: which apt packages can we remove? 122 | 123 | # Labels for introspection 124 | LABEL maintainer="Evan Wies " 125 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 126 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 127 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 128 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 129 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 130 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 131 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 132 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 133 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 134 | -------------------------------------------------------------------------------- /_archive/Dockerfile.stretch: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian Stretch 2 | # 3 | # Installs Solarflare's OpenOnload into Debian Stretch (`stretch-slim`). 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="debian" 19 | ARG ONLOAD_DEBIAN_TAG="stretch-slim" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="debian" 24 | ARG ONLOAD_DEBIAN_TAG="stretch-slim" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | ca-certificates \ 70 | coreutils \ 71 | curl \ 72 | ethtool \ 73 | gcc \ 74 | kmod \ 75 | libpcap0.8-dev \ 76 | libtool-bin \ 77 | make \ 78 | net-tools \ 79 | perl \ 80 | python-dev \ 81 | sed \ 82 | tar \ 83 | unzip \ 84 | valgrind \ 85 | wget \ 86 | && cd /tmp \ 87 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 88 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 89 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 90 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 91 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 92 | else \ 93 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 94 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 95 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 96 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 97 | fi \ 98 | && cd /tmp/onload-${ONLOAD_VERSION} \ 99 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 100 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 101 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 102 | fi \ 103 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 104 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 105 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 106 | fi \ 107 | && cd scripts \ 108 | && ./onload_build --user64 \ 109 | && ./onload_install --userfiles --nobuild \ 110 | && cd /tmp \ 111 | && rm -rf onload-${ONLOAD_VERSION}* \ 112 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 113 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 114 | fi \ 115 | && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ 116 | curl \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 118 | 119 | # Labels for introspection 120 | LABEL maintainer="Evan Wies " 121 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 122 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 123 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 124 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 125 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 126 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 127 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 128 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 129 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 130 | -------------------------------------------------------------------------------- /_archive/Dockerfile.trusty: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Trusty 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Trusty. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="trusty" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="trusty" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | ca-certificates \ 70 | coreutils \ 71 | curl \ 72 | ethtool \ 73 | gcc \ 74 | kmod \ 75 | libpcap0.8-dev \ 76 | libtool \ 77 | make \ 78 | net-tools \ 79 | perl \ 80 | python-dev \ 81 | sed \ 82 | tar \ 83 | unzip \ 84 | valgrind \ 85 | wget \ 86 | && cd /tmp \ 87 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 88 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 89 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 90 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 91 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 92 | else \ 93 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 94 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 95 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 96 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 97 | fi \ 98 | && cd /tmp/onload-${ONLOAD_VERSION} \ 99 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 100 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 101 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 102 | fi \ 103 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 104 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 105 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 106 | fi \ 107 | && cd scripts \ 108 | && ./onload_build --user64 \ 109 | && ./onload_install --userfiles --nobuild \ 110 | && cd /tmp \ 111 | && rm -rf onload-${ONLOAD_VERSION}* \ 112 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 113 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 114 | fi \ 115 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 116 | 117 | 118 | # Labels for introspection 119 | LABEL maintainer="Evan Wies " 120 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 121 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 122 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 123 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 124 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 125 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 126 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 127 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 128 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 129 | -------------------------------------------------------------------------------- /_archive/Dockerfile.xenial: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Xenial 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Xenial. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="xenial" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="xenial" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | ca-certificates \ 70 | coreutils \ 71 | curl \ 72 | ethtool \ 73 | gcc \ 74 | kmod \ 75 | libpcap0.8-dev \ 76 | libtool-bin \ 77 | make \ 78 | net-tools \ 79 | perl \ 80 | python-dev \ 81 | sed \ 82 | tar \ 83 | unzip \ 84 | valgrind \ 85 | wget \ 86 | && cd /tmp \ 87 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 88 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 89 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 90 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 91 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 92 | else \ 93 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 94 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 95 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 96 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 97 | fi \ 98 | && cd /tmp/onload-${ONLOAD_VERSION} \ 99 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 100 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 101 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 102 | fi \ 103 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 104 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 105 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 106 | fi \ 107 | && cd scripts \ 108 | && ./onload_build --user64 \ 109 | && ./onload_install --userfiles --nobuild \ 110 | && cd /tmp \ 111 | && rm -rf onload-${ONLOAD_VERSION}* \ 112 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 113 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 114 | fi \ 115 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 116 | 117 | 118 | # Labels for introspection 119 | LABEL maintainer="Evan Wies " 120 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 121 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 122 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 123 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 124 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 125 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 126 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 127 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 128 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 129 | -------------------------------------------------------------------------------- /bionic/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Bionic Beaver 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Bionic. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="bionic" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="bionic" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | ca-certificates \ 70 | coreutils \ 71 | curl \ 72 | ethtool \ 73 | g++ \ 74 | gcc \ 75 | kmod \ 76 | libcap-dev \ 77 | libpcap0.8-dev \ 78 | libtool-bin \ 79 | make \ 80 | net-tools \ 81 | patch \ 82 | perl \ 83 | python-dev \ 84 | sed \ 85 | tar \ 86 | unzip \ 87 | valgrind \ 88 | wget \ 89 | && cd /tmp \ 90 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 91 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 92 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 93 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 94 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 95 | else \ 96 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 97 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 98 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 99 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 100 | fi \ 101 | && cd /tmp/onload-${ONLOAD_VERSION} \ 102 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 103 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 104 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 105 | fi \ 106 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 107 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 108 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 109 | fi \ 110 | && cd scripts \ 111 | && ./onload_build --user64 \ 112 | && ./onload_install --userfiles --nobuild \ 113 | && cd /tmp \ 114 | && rm -rf onload-${ONLOAD_VERSION}* \ 115 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 116 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 117 | fi \ 118 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 119 | 120 | 121 | # Labels for introspection 122 | LABEL maintainer="Evan Wies " 123 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 124 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 125 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 126 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 127 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 128 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 129 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 130 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 131 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 132 | -------------------------------------------------------------------------------- /bookworm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian Bookworm 2 | # 3 | # Installs Solarflare's OpenOnload into Debian Bookworm (`bookworm-slim`). 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version (ONLOAD_USERSPACE_ID) must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2023 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="debian" 19 | ARG ONLOAD_DEBIAN_TAG="bookworm-slim" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="debian" 24 | ARG ONLOAD_DEBIAN_TAG="bookworm-slim" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # To build from an Onload git repository, set ONLOAD_GIT_REF. 31 | # Be sure to set the appropriate ONLOAD_VERSION and ONLOAD_USERSPACE_ID for your system. 32 | ARG ONLOAD_GIT_REF="" 33 | ARG ONLOAD_GIT_URL="https://github.com/Xilinx-CNS/onload.git" 34 | 35 | # Onload package URL and legacy URL 36 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 37 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 38 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 39 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 40 | 41 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 42 | # Default is to exclude it. 43 | ARG ONLOAD_WITHZF 44 | 45 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 46 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 47 | # 48 | # This only works with OpenOnload 201811 and newer. 49 | # 50 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 51 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 52 | # https://github.com/jemalloc/jemalloc/issues/443 53 | # https://github.com/jemalloc/jemalloc/issues/1426 54 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 55 | 56 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 57 | # Default is empty, using the actual build md5sum ID 58 | # 59 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 60 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 61 | # thus one may need to spoof the userspace ID. 62 | ARG ONLOAD_USERSPACE_ID 63 | 64 | # 1) Install OpenOnload build dependencies 65 | # 2) Download and verify OpenOnload from Solarflare's site 66 | # 3) Extract, build, and install onload 67 | # 4) Cleanup 68 | 69 | RUN \ 70 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 71 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 72 | autoconf \ 73 | automake \ 74 | ca-certificates \ 75 | coreutils \ 76 | curl \ 77 | ethtool \ 78 | g++ \ 79 | gcc \ 80 | git \ 81 | kmod \ 82 | libcap-dev \ 83 | libpcap0.8-dev \ 84 | libtool-bin \ 85 | make \ 86 | net-tools \ 87 | perl \ 88 | python-dev-is-python3 \ 89 | sed \ 90 | tar \ 91 | unzip \ 92 | valgrind \ 93 | wget \ 94 | && cd /tmp \ 95 | && if [ -n "${ONLOAD_GIT_REF}" ] ; then \ 96 | git clone "${ONLOAD_GIT_URL}" "onload-${ONLOAD_VERSION}" \ 97 | && cd "onload-${ONLOAD_VERSION}" \ 98 | && git reset --hard "${ONLOAD_GIT_REF}" \ 99 | && scripts/onload_mkdist \ 100 | && tar xzf "onload-$(git log -1 --format="%H").tgz" \ 101 | && cd "onload-$(git log -1 --format="%H")" ; \ 102 | elif [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 103 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 104 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 105 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 106 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 107 | else \ 108 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 109 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 110 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 111 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 112 | fi \ 113 | && cd /tmp/onload-${ONLOAD_VERSION} \ 114 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 115 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 116 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 117 | fi \ 118 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 119 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 120 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 121 | fi \ 122 | && cd scripts \ 123 | && ./onload_build --user64 \ 124 | && ./onload_install --userfiles --nobuild \ 125 | && cd /tmp \ 126 | && rm -rf onload-${ONLOAD_VERSION}* \ 127 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 128 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 129 | fi \ 130 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 131 | 132 | 133 | # Labels for introspection 134 | LABEL maintainer="Evan Wies " 135 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 136 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 137 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 138 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 139 | LABEL ONLOAD_GIT_REF="${ONLOAD_GIT_REF}" 140 | LABEL ONLOAD_GIT_URL="${ONLOAD_GIT_URL}" 141 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 142 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 143 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 144 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 145 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 146 | -------------------------------------------------------------------------------- /build_all_flavors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # build_all_flavors.sh 4 | # 5 | # Builds all the images in this repo. 6 | # Handy for quality control before push 7 | # 8 | 9 | #DOCKER_FWD="--no-cache -q " 10 | 11 | VERSION="${1:-8.1.3.40}" 12 | 13 | for FLAVOR in $(./build_onload_image.rb --flavors); do 14 | time ./build_onload_image.rb -x -v $DOCKER_FWD -f $FLAVOR -o $VERSION -a ootestbuild: 15 | time ./build_onload_image.rb -x -v $DOCKER_FWD -f $FLAVOR -o $VERSION -a ootestbuild: --zf 16 | done 17 | -------------------------------------------------------------------------------- /build_all_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # build_all_images.sh 4 | # 5 | # Builds all the images in this repo. 6 | # Handy for quality control before push 7 | # 8 | 9 | #DOCKER_FWD="--no-cache -q " 10 | 11 | FLAVOR="${1:-noble}" 12 | 13 | 14 | for VERSION in $(./build_onload_image.rb --versions); do 15 | time ./build_onload_image.rb -x -v $DOCKER_FWD -f $FLAVOR -o $VERSION -a ootestbuild: 16 | time ./build_onload_image.rb -x -v $DOCKER_FWD -f $FLAVOR -o $VERSION -a ootestbuild: --zf 17 | done 18 | -------------------------------------------------------------------------------- /build_onload_image.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # Build helper for OpenOnload Docker images 3 | # Copyright (c) 2015-2021 Neomantra BV. 4 | 5 | require 'getoptlong' 6 | 7 | $ONLOAD_VERSIONS = { 8 | '8.1.3.40' => { 9 | :version => '8.1.3.40', 10 | :zf_version => '8.1.3.8', 11 | :driverid => 'c71e5318f0cc60edbe8fb390bb778a5d', 12 | :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/8-1-3-40/SF-109585-LS-44-OpenOnload-Release-Package.zip', 13 | :md5sum => '2cf23e45999e4c411c32ea13e91bcc49', 14 | :zf_package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/tcpdirect/8-1-3-8/XN-201046-LS-7-TCPDirect-Release-Package.zip', 15 | :zf_md5sum => '48a42da3468244d0bf65a97ebbea05cd' 16 | }, 17 | '8.1.2.26' => { 18 | :version => '8.1.2.26', 19 | :zf_version => '8.1.2.38', 20 | :driverid => '55285faa7791a719ba067d52108964c4', 21 | :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/8_1_2_26/SF-109585-LS-43-OpenOnload-Package.zip', 22 | :md5sum => 'b758408d51aec33f36e698009173eb13', 23 | :zf_package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/tcpdirect/8_1_2_38/XN-201046-LS-6-TCPDirect-Release-Package.zip', 24 | :zf_md5sum => '2d50b5da3d3cbb49384eb95d8765d1a2' 25 | }, 26 | '8.1.1.17' => { 27 | :version => '8.1.1.17', 28 | :zf_version => '8.1.1.23', 29 | :driverid => '1d52732765feca797791b9668b14fb4e', 30 | :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/8-1-1-17/SF-109585-LS-42-OpenOnload-Release-Package.zip', 31 | :md5sum => 'd3845b7c35798787de551e09e4272785', 32 | :zf_package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/tcpdirect/8-1-1-23/XN-201046-LS-5-TCPDirect-Release-Package.zip', 33 | :zf_md5sum => 'f966ad385cec3d632d3a6b9bb1ce64d9' 34 | }, 35 | '8.1.0.15' => { 36 | :version => '8.1.0.15', 37 | :zf_version => '8.1.0.19', 38 | :driverid => '1d52732765feca797791b9668b14fb4e', 39 | :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/8_1_0_15/SF-109585-LS-41-OpenOnload-Release-Package.zip', 40 | :md5sum => 'a016c90b5a1bc98ed4fef8d9e6407839', 41 | :zf_package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/tcpdirect/8_1_0_19/XN-201046-LS-4-TCPDirect-Release-Package.zip', 42 | :zf_md5sum => 'e36bc271f3c4fe25a8bb8498e9799206' 43 | }, 44 | '7.1.3.202' => { :version => '7.1.3.202', :md5sum => '6153f93f03c65b4d091e9247c195b58c', :driverid => '1d52732765feca797791b9668b14fb4e', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip' }, 45 | '7.1.2.141' => { :version => '7.1.2.141', :md5sum => 'bfda4a68267e2aa3d5bed02af229b4fc', :driverid => '1d52732765feca797791b9668b14fb4e', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-2-141/SF-109585-LS-36_OpenOnload_Release_Package.zip' }, 46 | '7.1.1.75' => { :version => '7.1.1.75', :md5sum => '39b2d8d40982f6f3afd3cdb084969e90', :driverid => '65869c81c4a7f92b75316cf88446a9f1', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-1-75/SF-109585-LS-35_OpenOnload_Release_Package.zip' }, 47 | '7.1.0.265' => { :version => '7.1.0.265', :md5sum => '4db72fe198ec88d71fb1d39ef60c5ba7', :driverid => 'd9857bc9bddb5c6abdeb3f22d69b21d1', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-0-265/SF-109585-LS-33_OpenOnload_Release_Package.zip' }, 48 | '7.0.0.176' => { :version => '7.0.0.176', :md5sum => '851ccf4fc76c96bcbeb01e1c57b20cce', :driverid => '6ac17472788a64c61013f3d7ed9ae4c9', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-0-0-176/SF-109585-LS-32_OpenOnload_Release_Package.zip' }, 49 | '201811-u1' => { :version => '201811-u1', :md5sum => '357e64862aa4145e49d218fd04e63407', :driverid => '2d850c0cd0616655dc3e31c7937acaf7', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201811-u1/SF-109585-LS-31_OpenOnload_Release_Package.zip' }, 50 | '201811' => { :version => '201811', :md5sum => 'fde70da355e11c8b4114b54114a35de1', :driverid => '357bb6508f1e324ea32da88f948efafa', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201811/SF-109585-LS-30_OpenOnload_Release_Package.zip' }, 51 | '201805-u1' => { :version => '201805-u1', :md5sum => 'f3b3761b4bfd74fec311fa0fe380ec0a', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201805-u1/SF-109585-LS-28_OpenOnload_Release_Package.zip' }, 52 | '201805' => { :version => '201805', :md5sum => 'cbc523076c63b61fc853094a9af25e56', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201805/SF-109585-LS-27_OpenOnload_Release_Package.zip' }, 53 | '201710-u1.1' => { :version => '201710-u1.1', :md5sum => '99593ea209282ea669c1c0618e15bb02', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201710-u1-1/SF-109585-LS-26_OpenOnload_Release_Package.zip' }, 54 | '201710-u1' => { :version => '201710-u1', :md5sum => '725ec834ee08720b36a161944a02cf2a', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201710-u1/SF-109585-LS-25_OpenOnload_Release_Package.zip' }, 55 | '201710' => { :version => '201710', :md5sum => 'f22e9046694c11d83ca1ad520f7e8c4a', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201710/SF-109585-LS-24_OpenOnload_Release_Package.zip' }, 56 | '201606-u1.3' => { :version => '201606-u1.3', :md5sum => '4313539336d14df264e5b945486f9e92', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201606-u1-3/SF-109585-LS-23_OpenOnload_Release_Package.zip' }, 57 | '201606-u1.2' => { :version => '201606-u1.2', :md5sum => 'fd3993a35b9e18aa32cb86fb9502623b', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201606-u1-2/SF-109585-LS-22_OpenOnload_Release_Package.zip' }, 58 | '201606-u1.1' => { :version => '201606-u1.1', :md5sum => 'f8ff1f18208dc95e912c636177b88bb1', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201606-u1-1/SF-109585-LS-21_OpenOnload_Release_Package.zip' }, 59 | '201606-u1' => { :version => '201606-u1', :md5sum => '21d242f4da8d48eb825e0c95c5010883', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201606-u1/SF-109585-LS-20_OpenOnload_Release_Package.zip' }, 60 | '201606' => { :version => '201606', :md5sum => 'a94dc9b45bda85096814d85e366afdea', :package_url => 'https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/201606/SF-109585-LS-19_OpenOnload_Release_Package.zip' }, 61 | '201509-u1' => { :version => '201509-u1', :md5sum => '01192799b6e932a043fdf27f5c28e6be' } 62 | } 63 | $ONLOAD_VERSIONS['latest'] = $ONLOAD_VERSIONS['7.1.3.202'].dup 64 | 65 | $IMAGE_FLAVORS = { 66 | 'bionic' => { :flavor => 'bionic' }, 67 | 'bookworm' => { :flavor => 'bookworm' }, 68 | 'bullseye' => { :flavor => 'bullseye' }, 69 | 'buster' => { :flavor => 'buster' }, 70 | 'centos7' => { :flavor => 'centos7' }, 71 | 'centos8' => { :flavor => 'centos8' }, 72 | 'focal' => { :flavor => 'focal' }, 73 | 'jammy' => { :flavor => 'jammy' }, 74 | 'noble' => { :flavor => 'noble' }, 75 | } 76 | # Archived Image Flavors 77 | # 'cosmic' => { :flavor => 'cosmic' }, 78 | # 'disco' => { :flavor => 'disco' }, 79 | # 'precise' => { :flavor => 'precise' }, 80 | # 'stretch' => { :flavor => 'stretch' }, 81 | # 'trusty' => { :flavor => 'trusty' }, 82 | # 'xenial' => { :flavor => 'xenial' } 83 | 84 | ############################################################################### 85 | 86 | USAGE_STR = < show the autotag name of --autotag 93 | 94 | --build show docker build command 95 | --execute execute docker build command 96 | 97 | OPTIONS 98 | --flavor -f specify build (required for --build or --execute) 99 | --onload -o specify onload to build (default is 'latest') 100 | 101 | --url -u Override URL for "packaged" versions. 102 | 103 | --tag -t tag image as 104 | --autotag -a tag image as -[-nozf]. 105 | is optional, but note without a with colon, 106 | the autotag will be a name not an image-name:tag 107 | 108 | --zf build with TCPDirect (zf) (or not, if optional is '0' or 'false') 109 | 110 | --arg pass '--build-arg ' to "docker build" 111 | 112 | --quiet -q build quietly (pass -q to "docker build") 113 | --no-cache pass --no-cache to "docker build" 114 | 115 | --execute -x also execute the build line 116 | 117 | --push -p push the built image 118 | 119 | --verbose -v verbose output 120 | --help -h show this help 121 | END_OF_USAGE 122 | 123 | $opts = { 124 | :action => nil, 125 | :execute => false, 126 | :push => false, 127 | :ooversion => 'latest', 128 | :flavor => nil, 129 | :tag => nil, 130 | :autotag => nil, 131 | :buildargs => [], 132 | :zf => false, 133 | :dockerfwd => [], 134 | :quiet => false, 135 | :cache => true, 136 | :verbose => 0 137 | } 138 | 139 | begin 140 | GetoptLong.new( 141 | [ '--versions', GetoptLong::NO_ARGUMENT ], 142 | [ '--flavors', GetoptLong::NO_ARGUMENT ], 143 | [ '--gettag', GetoptLong::OPTIONAL_ARGUMENT ], 144 | [ '--build', GetoptLong::NO_ARGUMENT ], 145 | [ '--onload', '-o', GetoptLong::REQUIRED_ARGUMENT ], 146 | [ '--flavor', '-f', GetoptLong::REQUIRED_ARGUMENT ], 147 | [ '--url', '-u', GetoptLong::REQUIRED_ARGUMENT ], 148 | [ '--tag', '-t', GetoptLong::REQUIRED_ARGUMENT ], 149 | [ '--autotag', '-a', GetoptLong::OPTIONAL_ARGUMENT ], 150 | [ '--arg', GetoptLong::REQUIRED_ARGUMENT ], 151 | [ '--fwd', GetoptLong::REQUIRED_ARGUMENT ], 152 | [ '--zf', GetoptLong::OPTIONAL_ARGUMENT ], 153 | [ '--quiet', '-q', GetoptLong::NO_ARGUMENT ], 154 | [ '--no-cache', GetoptLong::NO_ARGUMENT ], 155 | [ '--execute', '-x', GetoptLong::NO_ARGUMENT ], 156 | [ '--push', '-p' ,GetoptLong::NO_ARGUMENT ], 157 | [ '--verbose', '-v', GetoptLong::NO_ARGUMENT ], 158 | [ '--help', '-h', GetoptLong::NO_ARGUMENT ] 159 | ).each do |opt, arg| 160 | case opt 161 | when '--versions' 162 | $opts[:action] = :versions 163 | when '--flavors' 164 | $opts[:action] = :flavors 165 | when '--gettag' 166 | $opts[:action] = :gettag 167 | $opts[:autotag] = arg || '' if $opts[:autotag].nil? 168 | when '--build' 169 | $opts[:action] = :build 170 | when '--onload' 171 | if $opts[:ooversion] != 'latest' then 172 | STDERR << "ERROR: --onload can only be specified once\n" 173 | exit(-1) 174 | end 175 | $opts[:ooversion] = arg 176 | when '--flavor' 177 | if ! $opts[:flavor].nil? then 178 | STDERR << "ERROR: --flavor can only be specified once\n" 179 | exit(-1) 180 | end 181 | $opts[:flavor] = arg 182 | when '--url' 183 | $opts[:url] = arg 184 | when '--tag' 185 | $opts[:tag] = arg 186 | when '--autotag' 187 | $opts[:autotag] = arg 188 | when '--arg' 189 | $opts[:buildargs] << arg 190 | when '--fwd' 191 | $opts[:dockerfwd] << arg 192 | when '--zf' 193 | $opts[:zf] = true 194 | $opts[:zf] = false if arg == '0' || arg.downcase == 'false' 195 | when '--quiet' 196 | $opts[:quiet] = true 197 | when '--no-cache' 198 | $opts[:cache] = false 199 | when '--execute' 200 | $opts[:action] = :build 201 | $opts[:execute] = true 202 | when '--push' 203 | $opts[:push] = true 204 | when '--verbose' 205 | $opts[:verbose] += 1 206 | when '--help' 207 | $opts[:action] = :help 208 | end 209 | end 210 | rescue StandardError => e 211 | STDERR << "ERROR: #{e.to_s}\n" 212 | exit(-1) 213 | end 214 | 215 | ############################################################################### 216 | 217 | def get_version() 218 | version = $opts[:ooversion] 219 | if version.nil? then 220 | STDERR << "ERROR: a valid version must be specified with --build (-b). List with --versions\n" 221 | exit(-1) 222 | end 223 | if ! $ONLOAD_VERSIONS.has_key? version then 224 | STDERR << "ERROR: unknown onload version '#{version}'. List with --versions\n" 225 | exit(-1) 226 | end 227 | return version 228 | end 229 | 230 | 231 | def get_flavor() 232 | flavor = $opts[:flavor] 233 | if flavor.nil? then 234 | STDERR << "ERROR: a valid flavor must be specified with --flavor (-f). List with --flavors.\n" 235 | exit(-1) 236 | end 237 | if ! $IMAGE_FLAVORS.has_key? flavor then 238 | STDERR << "ERROR: unknown flavor '#{flavor}'. List with --flavors.\n" 239 | exit(-1) 240 | end 241 | return flavor 242 | end 243 | 244 | 245 | def get_tag() 246 | # check tag arguments 247 | if ! $opts[:tag].nil? && ! $opts[:autotag].nil? then 248 | STDERR << "ERROR: cannot specify both --tag and --autotag (or --gettag with argument)\n" 249 | exit(-1) 250 | end 251 | 252 | if ! $opts[:tag].nil? then 253 | return $opts[:tag] 254 | end 255 | 256 | version = get_version() 257 | flavor = get_flavor() 258 | tag = $opts[:tag] 259 | if $opts[:autotag] then 260 | tag = "#{$opts[:autotag]}#{version}-#{flavor}#{$opts[:zf] ? "" : "-nozf"}" 261 | end 262 | return tag 263 | end 264 | 265 | 266 | 267 | ############################################################################### 268 | 269 | 270 | case $opts[:action] 271 | when :versions 272 | if $opts[:verbose] == 0 then 273 | $ONLOAD_VERSIONS.each do |k, v| 274 | next if k == 'latest' 275 | STDOUT << sprintf("%s\n", v[:version]) 276 | end 277 | else 278 | $ONLOAD_VERSIONS.each do |k, v| 279 | next if k == 'latest' 280 | STDOUT << sprintf("%-16s %s %s %s\n", 281 | v[:version], v[:md5sum], 282 | v[:driverid] || "", 283 | v[:package_url] || "") 284 | end 285 | end 286 | when :flavors 287 | $IMAGE_FLAVORS.each do |k, v| 288 | STDOUT << sprintf("%s\n", v[:flavor]) 289 | end 290 | when :gettag 291 | if $opts[:tag].nil? && $opts[:autotag].nil? then 292 | STDERR << "ERROR: must specify either --tag and --autotag (or --gettag with argument)\n" 293 | exit(-1) 294 | end 295 | STDOUT << get_tag() << "\n" 296 | when :build 297 | tag = get_tag() 298 | 299 | if $opts[:push] && !$opts[:execute] then 300 | STDERR << "--push requires --execute\n" 301 | exit(-1) 302 | end 303 | if $opts[:push] && tag.nil? then 304 | STDERR << "--push requires --tag or --autotag\n" 305 | exit(-1) 306 | end 307 | 308 | version = get_version() 309 | vdata = $ONLOAD_VERSIONS[version] 310 | cmd = "docker build --build-arg ONLOAD_VERSION=#{vdata[:version]} --build-arg ONLOAD_MD5SUM=#{vdata[:md5sum]} " 311 | package_url = $opts[:url] || vdata[:package_url] 312 | if ! package_url.nil? then 313 | cmd += " --build-arg ONLOAD_PACKAGE_URL='#{package_url}' " 314 | else 315 | # Force an empty OPEN_PACKAGE_URL to build legacy 316 | cmd += " --build-arg ONLOAD_PACKAGE_URL='' " 317 | end 318 | 319 | if $opts[:zf] then 320 | cmd += "--build-arg ONLOAD_WITHZF=1 " 321 | cmd += "--build-arg ONLOADZF_VERSION='#{vdata[:zf_version]}' " if vdata[:zf_version] 322 | cmd += "--build-arg ONLOADZF_PACKAGE_URL='#{vdata[:zf_package_url]}' " if vdata[:zf_package_url] 323 | cmd += "--build-arg ONLOADZF_MD5SUM='#{vdata[:zf_md5sum]}' " if vdata[:zf_md5sum] 324 | end 325 | $opts[:buildargs].each { |arg| cmd += "--build-arg #{arg} " } 326 | 327 | cmd += "-q " if $opts[:quiet] 328 | cmd += "--no-cache " if ! $opts[:cache] 329 | cmd += "-t #{tag} " if ! tag.nil? 330 | 331 | flavor = get_flavor() 332 | cmd += "-f #{flavor}/Dockerfile " 333 | 334 | $opts[:dockerfwd].each { |fwd| cmd += " #{fwd} " } 335 | 336 | cmd += " ." 337 | 338 | STDOUT << cmd << "\n" 339 | if $opts[:execute] then 340 | res = system(cmd) 341 | if !res then 342 | STDERR << "ERROR: docker build failed with code #{$?}\n" 343 | elsif $opts[:push] then 344 | res = system("docker push #{tag}") 345 | if !res then 346 | STDERR << "ERROR: docker push failed with code #{$?}\n" 347 | end 348 | end 349 | end 350 | 351 | when :help 352 | STDERR << USAGE_STR << "\n"; 353 | exit(0) 354 | when nil 355 | STDERR << "no action specified. try --help\n"; 356 | exit(-1) 357 | end 358 | -------------------------------------------------------------------------------- /bullseye/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian Bullseye 2 | # 3 | # Installs Solarflare's OpenOnload into Debian Bullseye (`bullseye-slim`). 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version (ONLOAD_USERSPACE_ID) must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="debian" 19 | ARG ONLOAD_DEBIAN_TAG="bullseye-slim" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="debian" 24 | ARG ONLOAD_DEBIAN_TAG="bullseye-slim" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # To build from an Onload git repository, set ONLOAD_GIT_REF. 31 | # Be sure to set the appropriate ONLOAD_VERSION and ONLOAD_USERSPACE_ID for your system. 32 | ARG ONLOAD_GIT_REF="" 33 | ARG ONLOAD_GIT_URL="https://github.com/Xilinx-CNS/onload.git" 34 | 35 | # Onload package URL and legacy URL 36 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 37 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 38 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 39 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 40 | 41 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 42 | # Default is to exclude it. 43 | ARG ONLOAD_WITHZF 44 | 45 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 46 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 47 | # 48 | # This only works with OpenOnload 201811 and newer. 49 | # 50 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 51 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 52 | # https://github.com/jemalloc/jemalloc/issues/443 53 | # https://github.com/jemalloc/jemalloc/issues/1426 54 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 55 | 56 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 57 | # Default is empty, using the actual build md5sum ID 58 | # 59 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 60 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 61 | # thus one may need to spoof the userspace ID. 62 | ARG ONLOAD_USERSPACE_ID 63 | 64 | # 1) Install OpenOnload build dependencies 65 | # 2) Download and verify OpenOnload from Solarflare's site 66 | # 3) Extract, build, and install onload 67 | # 4) Cleanup 68 | 69 | RUN \ 70 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 71 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 72 | autoconf \ 73 | automake \ 74 | ca-certificates \ 75 | coreutils \ 76 | curl \ 77 | ethtool \ 78 | g++ \ 79 | gcc \ 80 | git \ 81 | kmod \ 82 | libcap-dev \ 83 | libpcap0.8-dev \ 84 | libtool-bin \ 85 | make \ 86 | net-tools \ 87 | perl \ 88 | python-dev \ 89 | sed \ 90 | tar \ 91 | unzip \ 92 | valgrind \ 93 | wget \ 94 | && cd /tmp \ 95 | && if [ -n "${ONLOAD_GIT_REF}" ] ; then \ 96 | git clone "${ONLOAD_GIT_URL}" "onload-${ONLOAD_VERSION}" \ 97 | && cd "onload-${ONLOAD_VERSION}" \ 98 | && git reset --hard "${ONLOAD_GIT_REF}" \ 99 | && scripts/onload_mkdist \ 100 | && tar xzf "onload-$(git log -1 --format="%H").tgz" \ 101 | && cd "onload-$(git log -1 --format="%H")" ; \ 102 | elif [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 103 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 104 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 105 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 106 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 107 | else \ 108 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 109 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 110 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 111 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 112 | fi \ 113 | && cd /tmp/onload-${ONLOAD_VERSION} \ 114 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 115 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 116 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 117 | fi \ 118 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 119 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 120 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 121 | fi \ 122 | && cd scripts \ 123 | && ./onload_build --user64 \ 124 | && ./onload_install --userfiles --nobuild \ 125 | && cd /tmp \ 126 | && rm -rf onload-${ONLOAD_VERSION}* \ 127 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 128 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 129 | fi \ 130 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 131 | 132 | 133 | # Labels for introspection 134 | LABEL maintainer="Evan Wies " 135 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 136 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 137 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 138 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 139 | LABEL ONLOAD_GIT_REF="${ONLOAD_GIT_REF}" 140 | LABEL ONLOAD_GIT_URL="${ONLOAD_GIT_URL}" 141 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 142 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 143 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 144 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 145 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 146 | -------------------------------------------------------------------------------- /buster/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Debian Buster 2 | # 3 | # Installs Solarflare's OpenOnload into Debian Buster (`buster-slim`). 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="debian" 19 | ARG ONLOAD_DEBIAN_TAG="buster-slim" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="debian" 24 | ARG ONLOAD_DEBIAN_TAG="buster-slim" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 66 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 67 | autoconf \ 68 | automake \ 69 | ca-certificates \ 70 | coreutils \ 71 | curl \ 72 | ethtool \ 73 | g++ \ 74 | gcc \ 75 | kmod \ 76 | libcap-dev \ 77 | libpcap0.8-dev \ 78 | libtool-bin \ 79 | make \ 80 | net-tools \ 81 | perl \ 82 | python-dev \ 83 | sed \ 84 | tar \ 85 | unzip \ 86 | valgrind \ 87 | wget \ 88 | && cd /tmp \ 89 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 90 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 91 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 92 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 93 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 94 | else \ 95 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 96 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 97 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 98 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 99 | fi \ 100 | && cd /tmp/onload-${ONLOAD_VERSION} \ 101 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 102 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 103 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 104 | fi \ 105 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 106 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 107 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 108 | fi \ 109 | && cd scripts \ 110 | && ./onload_build --user64 \ 111 | && ./onload_install --userfiles --nobuild \ 112 | && cd /tmp \ 113 | && rm -rf onload-${ONLOAD_VERSION}* \ 114 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 115 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 116 | fi \ 117 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 118 | 119 | 120 | # Labels for introspection 121 | LABEL maintainer="Evan Wies " 122 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 123 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 124 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 125 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 126 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 127 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 128 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 129 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 130 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 131 | -------------------------------------------------------------------------------- /centos7/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - CentOS 7 2 | # 3 | # Installs Solarflare's OpenOnload into CentOS 7. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_CENTOS_BASE="centos" 19 | ARG ONLOAD_CENTOS_TAG="7" 20 | 21 | FROM ${ONLOAD_CENTOS_BASE}:${ONLOAD_CENTOS_TAG} 22 | 23 | ARG ONLOAD_CENTOS_BASE="centos" 24 | ARG ONLOAD_CENTOS_TAG="7" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 41 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 42 | # 43 | # This only works with OpenOnload 201811 and newer. 44 | # 45 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 46 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 47 | # https://github.com/jemalloc/jemalloc/issues/443 48 | # https://github.com/jemalloc/jemalloc/issues/1426 49 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 50 | 51 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 52 | # Default is empty, using the actual build md5sum ID 53 | # 54 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 55 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 56 | # thus one may need to spoof the userspace ID. 57 | ARG ONLOAD_USERSPACE_ID 58 | 59 | # 1) Install OpenOnload build dependencies 60 | # 2) Download and verify OpenOnload from Solarflare's site 61 | # 3) Extract, build, and install onload 62 | # 4) Cleanup 63 | 64 | RUN \ 65 | yum install -y \ 66 | autoconf \ 67 | automake \ 68 | bash \ 69 | binutils \ 70 | file \ 71 | gawk \ 72 | gcc \ 73 | gcc-c++ \ 74 | gettext \ 75 | glibc-common \ 76 | glibc-devel.x86_64 \ 77 | kernel-devel \ 78 | libcap-devel \ 79 | libgcc.x86_64 \ 80 | libpcap-devel \ 81 | libtool \ 82 | make \ 83 | module-init-tools \ 84 | python-devel \ 85 | sed \ 86 | tar \ 87 | unzip \ 88 | valgrind-devel \ 89 | which \ 90 | && cd /tmp \ 91 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 92 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 93 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 94 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 95 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 96 | else \ 97 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 98 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 99 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 100 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 101 | fi \ 102 | && cd /tmp/onload-${ONLOAD_VERSION} \ 103 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 104 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 105 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 106 | fi \ 107 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 108 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 109 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 110 | fi \ 111 | && cd scripts \ 112 | && ./onload_build --user64 \ 113 | && ./onload_install --userfiles --nobuild \ 114 | && cd /tmp \ 115 | && rm -rf onload-${ONLOAD_VERSION}* \ 116 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 117 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 118 | fi \ 119 | && yum clean all 120 | 121 | 122 | # Labels for introspection 123 | LABEL maintainer="Evan Wies " 124 | LABEL ONLOAD_CENTOS_BASE="${ONLOAD_CENTOS_BASE}" 125 | LABEL ONLOAD_CENTOS_TAG="${ONLOAD_CENTOS_TAG}" 126 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 127 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 128 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 129 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 130 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 131 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 132 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 133 | -------------------------------------------------------------------------------- /centos8/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - CentOS 8 2 | # 3 | # Installs Solarflare's OpenOnload into CentOS 8. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_CENTOS_BASE="centos" 19 | ARG ONLOAD_CENTOS_TAG="8" 20 | 21 | FROM ${ONLOAD_CENTOS_BASE}:${ONLOAD_CENTOS_TAG} 22 | 23 | ARG ONLOAD_CENTOS_BASE="centos" 24 | ARG ONLOAD_CENTOS_TAG="8" 25 | 26 | # The PowerTools repo changed names from PowerTools to powertools in Centos 8.3 27 | ARG ONLOAD_CENTOS_POWERTOOLS="powertools" 28 | 29 | # Onload version and its md5sum 30 | ARG ONLOAD_VERSION="7.1.3.202" 31 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 32 | 33 | # Onload package URL and legacy URL 34 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 35 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 36 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 37 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 38 | 39 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 40 | # Default is to exclude it. 41 | ARG ONLOAD_WITHZF 42 | 43 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 44 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 45 | # 46 | # This only works with OpenOnload 201811 and newer. 47 | # 48 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 49 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 50 | # https://github.com/jemalloc/jemalloc/issues/443 51 | # https://github.com/jemalloc/jemalloc/issues/1426 52 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 53 | 54 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 55 | # Default is empty, using the actual build md5sum ID 56 | # 57 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 58 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 59 | # thus one may need to spoof the userspace ID. 60 | ARG ONLOAD_USERSPACE_ID 61 | 62 | # 1) Install OpenOnload build dependencies 63 | # 2) Download and verify OpenOnload from Solarflare's site 64 | # 3) Extract, build, and install onload 65 | # 4) Cleanup 66 | 67 | RUN find /etc/yum.repos.d -name 'CentOS-Linux-*' -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; \ 68 | && find /etc/yum.repos.d -name 'CentOS-Linux-*' -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; \ 69 | && yum install -y 'dnf-command(config-manager)' \ 70 | && yum config-manager --set-enabled "${ONLOAD_CENTOS_POWERTOOLS}" \ 71 | && yum install -y \ 72 | autoconf \ 73 | automake \ 74 | bash \ 75 | binutils \ 76 | file \ 77 | gawk \ 78 | gcc \ 79 | gcc-c++ \ 80 | gettext \ 81 | glibc-common \ 82 | glibc-devel.x86_64 \ 83 | kernel-devel \ 84 | libcap-devel \ 85 | libgcc.x86_64 \ 86 | libpcap-devel \ 87 | libtool \ 88 | make \ 89 | module-init-tools \ 90 | python3-devel \ 91 | sed \ 92 | tar \ 93 | unzip \ 94 | valgrind-devel \ 95 | which \ 96 | && cd /tmp \ 97 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 98 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 99 | && ls -l /tmp \ 100 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 101 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 102 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 103 | else \ 104 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 105 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 106 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 107 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 108 | fi \ 109 | && cd /tmp/onload-${ONLOAD_VERSION} \ 110 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 111 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 112 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 113 | fi \ 114 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 115 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 116 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 117 | fi \ 118 | && cd scripts \ 119 | && ./onload_build --user64 \ 120 | && ./onload_install --userfiles --nobuild \ 121 | && cd /tmp \ 122 | && rm -rf onload-${ONLOAD_VERSION}* \ 123 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 124 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 125 | fi \ 126 | && yum clean all 127 | 128 | 129 | # Labels for introspection 130 | LABEL maintainer="Evan Wies " 131 | LABEL ONLOAD_CENTOS_BASE="${ONLOAD_CENTOS_BASE}" 132 | LABEL ONLOAD_CENTOS_TAG="${ONLOAD_CENTOS_TAG}" 133 | LABEL ONLOAD_CENTOS_POWERTOOLS="${ONLOAD_CENTOS_POWERTOOLS}" 134 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 135 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 136 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 137 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 138 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 139 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 140 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 141 | -------------------------------------------------------------------------------- /docker_build_and_push_flavor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | # Builds and pushes flavors, with image names based on TRAVIS variables 3 | # 4 | # ./docker_build_and_push_flavor.sh FLAVOR [DOCKERFILE_PATH] [BUILD PARAMS] 5 | # 6 | # Environment Variables 7 | # DOCKER_ORG 8 | # DOCKER_USERNAME 9 | # DOCKER_TOKEN 10 | # IMAGE_NAME 11 | # GITHUB_REF_NAME 12 | # GITHUB_REF_TYPE 13 | # 14 | 15 | set -e 16 | 17 | if [ -z "$DOCKER_ORG" ] ; then 18 | echo "missing env DOCKER_ORG" >&2 19 | exit 1 20 | fi 21 | 22 | 23 | FLAVOR="$1" 24 | shift 25 | DOCKERFILE_PATH=${1:-$FLAVOR/Dockerfile} 26 | shift 27 | DOCKER_BUILD_PARAMS="$@" 28 | 29 | IMAGE_NAME="${IMAGE_NAME:-onload}" 30 | 31 | docker_login_from_file () { 32 | if [ -f "$DOCKER_PASSFILE" ] ; then 33 | cat "$DOCKER_PASSFILE" | docker login -u="$DOCKER_USERNAME" --password-stdin 34 | fi 35 | } 36 | 37 | 38 | docker_login_from_file 39 | 40 | docker build -t $IMAGE_NAME:$FLAVOR -f $DOCKERFILE_PATH $DOCKER_BUILD_PARAMS . 41 | 42 | if [[ "$GITHUB_REF_NAME" == "master" ]] ; then 43 | docker_login_from_file && 44 | docker tag $IMAGE_NAME:$FLAVOR $DOCKER_ORG/$IMAGE_NAME:$FLAVOR && 45 | docker push $DOCKER_ORG/$IMAGE_NAME:$FLAVOR ; 46 | fi 47 | 48 | if [[ "$GITHUB_REF_TYPE" == "tag" ]] ; then 49 | docker_login_from_file && 50 | docker tag $IMAGE_NAME:$FLAVOR $DOCKER_ORG/$IMAGE_NAME:$GITHUB_REF_NAME-$FLAVOR && 51 | docker push $DOCKER_ORG/$IMAGE_NAME:$GITHUB_REF_NAME-$FLAVOR ; 52 | fi 53 | -------------------------------------------------------------------------------- /focal/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Focal Fossa 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Focal. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="focal" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="focal" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # ZFDirect installation arguments 41 | ARG ONLOADZF_VERSION 42 | ARG ONLOADZF_PACKAGE_URL 43 | ARG ONLOADZF_MD5SUM 44 | 45 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 46 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 47 | # 48 | # This only works with OpenOnload 201811 and newer. 49 | # 50 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 51 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 52 | # https://github.com/jemalloc/jemalloc/issues/443 53 | # https://github.com/jemalloc/jemalloc/issues/1426 54 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 55 | 56 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 57 | # Default is empty, using the actual build md5sum ID 58 | # 59 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 60 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 61 | # thus one may need to spoof the userspace ID. 62 | ARG ONLOAD_USERSPACE_ID 63 | 64 | # 1) Install OpenOnload build dependencies 65 | # 2) Download and verify OpenOnload from Solarflare's site 66 | # 3) Extract, build, and install onload 67 | # 4) Cleanup 68 | 69 | RUN \ 70 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 71 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 72 | autoconf \ 73 | automake \ 74 | ca-certificates \ 75 | coreutils \ 76 | curl \ 77 | ethtool \ 78 | g++-10 \ 79 | gcc-10 \ 80 | kmod \ 81 | libcap-dev \ 82 | libpcap0.8-dev \ 83 | libtool-bin \ 84 | linux-libc-dev \ 85 | make \ 86 | net-tools \ 87 | patch \ 88 | perl \ 89 | python2-dev \ 90 | sed \ 91 | tar \ 92 | unzip \ 93 | util-linux \ 94 | valgrind \ 95 | wget \ 96 | && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \ 97 | && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 \ 98 | && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 \ 99 | && update-alternatives --set cc /usr/bin/gcc \ 100 | && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 \ 101 | && update-alternatives --set c++ /usr/bin/g++ \ 102 | && cd /tmp \ 103 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 104 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 105 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 106 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 107 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 108 | else \ 109 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 110 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 111 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 112 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 113 | fi 114 | 115 | RUN cd /tmp/onload-${ONLOAD_VERSION} \ 116 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 117 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 118 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 119 | fi \ 120 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 121 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 122 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 123 | fi \ 124 | && cd scripts \ 125 | && ./onload_build --user64 \ 126 | && ./onload_install --userfiles --nobuild \ 127 | && cd /tmp \ 128 | && rm -rf onload-${ONLOAD_VERSION}* \ 129 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 130 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 131 | else \ 132 | if [ -n "${ONLOADZF_PACKAGE_URL}" ] ; then \ 133 | curl -fSL "${ONLOADZF_PACKAGE_URL}" -o /tmp/tcpdirect-${ONLOADZF_VERSION}-package.zip \ 134 | && unzip /tmp/tcpdirect-${ONLOADZF_VERSION}-package.zip \ 135 | && echo "${ONLOADZF_MD5SUM} tcpdirect-${ONLOADZF_VERSION}.tgz" | md5sum --check \ 136 | && tar -zxf tcpdirect-${ONLOADZF_VERSION}.tgz \ 137 | && cd tcpdirect-${ONLOADZF_VERSION} \ 138 | && ./scripts/zf_install \ 139 | && cd /tmp \ 140 | && rm -rf tcpdirect-${ONLOADZF_VERSION}* ; \ 141 | fi \ 142 | fi \ 143 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 144 | 145 | 146 | # Labels for introspection 147 | LABEL maintainer="Evan Wies " 148 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 149 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 150 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 151 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 152 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 153 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 154 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 155 | LABEL ONLOADZF_VERSION="${ONLOADZF_VERSION}" 156 | LABEL ONLOADZF_PACKAGE_URL="${ONLOADZF_PACKAGE_URL}" 157 | LABEL ONLOADZF_MD5SUM="${ONLOADZF_MD5SUM}" 158 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 159 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 160 | -------------------------------------------------------------------------------- /gen_gitlab_yml.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # gitlab-ci YAML generator for dynamic build matrices 3 | 4 | require 'getoptlong' 5 | 6 | ############################################################################### 7 | 8 | USAGE_STR = < specify the image prefix to which the tag will be appended (require) 12 | --flavor -f specify build , can do multiple (default: 'all', all flavors) 13 | --onload -o specify onload to build (default is 'latest') 14 | --zf build with TCPDirect (zf) (or not, if optional is '0' or 'false') 15 | 16 | --template -t generate template section 17 | 18 | --help -h show this help 19 | 20 | END_OF_USAGE 21 | 22 | $opts = { 23 | :template => false, 24 | :prefix => nil, 25 | :ooversion => 'latest', 26 | :flavors => [], 27 | :zf => false 28 | } 29 | 30 | begin 31 | GetoptLong.new( 32 | [ '--prefix', '-p', GetoptLong::REQUIRED_ARGUMENT ], 33 | [ '--flavor', '-f', GetoptLong::REQUIRED_ARGUMENT ], 34 | [ '--onload', '-o', GetoptLong::REQUIRED_ARGUMENT ], 35 | [ '--zf', GetoptLong::OPTIONAL_ARGUMENT ], 36 | [ '--template', '-t', GetoptLong::OPTIONAL_ARGUMENT ], 37 | [ '--help', '-h', GetoptLong::NO_ARGUMENT ] 38 | ).each do |opt, arg| 39 | case opt 40 | when '--prefix' 41 | if !$opts[:prefix].nil? then 42 | STDERR << "ERROR: --prefix can only be specified once\n" 43 | exit(-1) 44 | end 45 | $opts[:prefix] = arg 46 | when '--onload' 47 | if $opts[:ooversion] != 'latest' then 48 | STDERR << "ERROR: --onload can only be specified once\n" 49 | exit(-1) 50 | end 51 | $opts[:ooversion] = arg 52 | when '--flavor' 53 | $opts[:flavors] << arg 54 | when '--zf' 55 | $opts[:zf] = true 56 | $opts[:zf] = false if arg == '0' || arg.downcase == 'false' 57 | when '--template' 58 | $opts[:template] = true 59 | $opts[:template] = false if arg == '0' || arg.downcase == 'false' 60 | when '--help' 61 | $opts[:action] = :help 62 | end 63 | end 64 | rescue StandardError => e 65 | STDERR << "ERROR: #{e.to_s}\n" 66 | exit(-1) 67 | end 68 | 69 | if $opts[:prefix].nil? && !$opts[:template] then 70 | STDERR << "ERROR: --prefix must be specified\n" 71 | exit(-1) 72 | end 73 | 74 | ############################################################################### 75 | 76 | def gen_template() 77 | return <<~YML 78 | # Builds all the flavors for the given image tag 79 | # variables: 80 | # IMAGE_PREFIX 81 | # ONLOAD_VERSION 82 | # FLAVOR 83 | # USE_ZF 84 | .docker_build_onload_template: 85 | stage: build 86 | image: docker:latest 87 | services: 88 | - docker:dind 89 | retry: 1 90 | before_script: 91 | - apk add --update ruby 92 | - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin 93 | script: 94 | - | 95 | IMAGE_NAME_DEST=$(./build_onload_image.rb -o $ONLOAD_VERSION -f $FLAVOR -a "$IMAGE_PREFIX" --zf $USE_ZF --gettag) 96 | docker pull $IMAGE_NAME_DEST || true 97 | ./build_onload_image.rb -o $ONLOAD_VERSION -f $FLAVOR -a "$IMAGE_PREFIX" --zf $USE_ZF --execute --push 98 | IMAGE_NAME_SHA=$(./build_onload_image.rb -o $ONLOAD_VERSION -f $FLAVOR -a "$IMAGE_PREFIX$CI_COMMIT_SHA-" --zf $USE_ZF --gettag) 99 | docker tag $IMAGE_NAME_DEST $IMAGE_NAME_SHA 100 | docker push $IMAGE_NAME_SHA 101 | 102 | YML 103 | end 104 | 105 | ############################################################################### 106 | 107 | def gen_build_stanza(prefix, flavor, ooversion, use_zf) 108 | zf = use_zf ? "zf" : "" 109 | zfarg = use_zf ? "--zf " : "" 110 | 111 | return <<~YML 112 | onload#{zf}-#{flavor}-#{ooversion}: 113 | stage: build 114 | extends: .docker_build_onload_template 115 | variables: 116 | IMAGE_PREFIX: "#{prefix}" 117 | ONLOAD_VERSION: "#{ooversion}" 118 | FLAVOR: "#{flavor}" 119 | USE_ZF: "#{use_zf.to_s}" 120 | 121 | YML 122 | end 123 | 124 | ############################################################################### 125 | 126 | if $opts[:template] then 127 | STDOUT << gen_template() 128 | end 129 | 130 | if $opts[:flavors].empty? then 131 | %x{ ls -d */ | grep -v _archive | sed 's/\\///g' | sort }.each_line do |flavor| 132 | $opts[:flavors] << flavor.strip 133 | end 134 | end 135 | 136 | $opts[:flavors].each do |flavor| 137 | STDOUT << gen_build_stanza($opts[:prefix], flavor, $opts[:ooversion], $opts[:zf]) 138 | end 139 | -------------------------------------------------------------------------------- /jammy/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Jammy Jellyfish 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Jammy. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2021 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="jammy" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="jammy" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="7.1.3.202" 28 | ARG ONLOAD_MD5SUM="6153f93f03c65b4d091e9247c195b58c" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/7-1-3-202/SF-109585-LS-37-OpenOnload-release-package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # ZFDirect installation arguments 41 | ARG ONLOADZF_VERSION 42 | ARG ONLOADZF_PACKAGE_URL 43 | ARG ONLOADZF_MD5SUM 44 | 45 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 46 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 47 | # 48 | # This only works with OpenOnload 201811 and newer. 49 | # 50 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 51 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 52 | # https://github.com/jemalloc/jemalloc/issues/443 53 | # https://github.com/jemalloc/jemalloc/issues/1426 54 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 55 | 56 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 57 | # Default is empty, using the actual build md5sum ID 58 | # 59 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 60 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 61 | # thus one may need to spoof the userspace ID. 62 | ARG ONLOAD_USERSPACE_ID 63 | 64 | # 1) Install OpenOnload build dependencies 65 | # 2) Download and verify OpenOnload from Solarflare's site 66 | # 3) Extract, build, and install onload 67 | # 4) Cleanup 68 | 69 | RUN \ 70 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 71 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 72 | autoconf \ 73 | automake \ 74 | ca-certificates \ 75 | coreutils \ 76 | curl \ 77 | ethtool \ 78 | g++ \ 79 | gcc \ 80 | kmod \ 81 | libcap-dev \ 82 | libpcap0.8-dev \ 83 | libtool-bin \ 84 | linux-libc-dev \ 85 | make \ 86 | net-tools \ 87 | patch \ 88 | perl \ 89 | python2-dev \ 90 | sed \ 91 | tar \ 92 | unzip \ 93 | util-linux \ 94 | valgrind \ 95 | wget \ 96 | && cd /tmp \ 97 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 98 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 99 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 100 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 101 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 102 | else \ 103 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 104 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 105 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 106 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 107 | fi \ 108 | && cd /tmp/onload-${ONLOAD_VERSION} \ 109 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 110 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 111 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 112 | fi \ 113 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 114 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 115 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 116 | fi \ 117 | && cd scripts \ 118 | && ./onload_build --user64 \ 119 | && ./onload_install --userfiles --nobuild \ 120 | && cd /tmp \ 121 | && rm -rf onload-${ONLOAD_VERSION}* \ 122 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 123 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 124 | else \ 125 | if [ -n "${ONLOADZF_PACKAGE_URL}" ] ; then \ 126 | curl -fSL "${ONLOADZF_PACKAGE_URL}" -o /tmp/tcpdirect-${ONLOADZF_VERSION}-package.zip \ 127 | && unzip /tmp/tcpdirect-${ONLOADZF_VERSION}-package.zip \ 128 | && echo "${ONLOADZF_MD5SUM} tcpdirect-${ONLOADZF_VERSION}.tgz" | md5sum --check \ 129 | && tar -zxf tcpdirect-${ONLOADZF_VERSION}.tgz \ 130 | && cd tcpdirect-${ONLOADZF_VERSION} \ 131 | && ./scripts/zf_install \ 132 | && cd /tmp \ 133 | && rm -rf tcpdirect-${ONLOADZF_VERSION}* ; \ 134 | fi \ 135 | fi \ 136 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 137 | 138 | 139 | # Labels for introspection 140 | LABEL maintainer="Evan Wies " 141 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 142 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 143 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 144 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 145 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 146 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 147 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 148 | LABEL ONLOADZF_VERSION="${ONLOADZF_VERSION}" 149 | LABEL ONLOADZF_PACKAGE_URL="${ONLOADZF_PACKAGE_URL}" 150 | LABEL ONLOADZF_MD5SUM="${ONLOADZF_MD5SUM}" 151 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 152 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 153 | -------------------------------------------------------------------------------- /noble/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile - Ubuntu Noble Numbat 2 | # 3 | # Installs Solarflare's OpenOnload into Ubuntu Noble. 4 | # 5 | # OpenOnload web page: 6 | # https://www.openonload.org/ 7 | # 8 | # To expose the host and onload to this container, run like this: 9 | # 10 | # docker run --net=host --device=/dev/onload --device=/dev/onload_epoll --device=/dev/onload_cplane -it ONLOAD_ENABLED_IMAGE_ID [COMMAND] [ARG...] 11 | # 12 | # NOTE: The host's OpenOnload version must be the same as the container's. 13 | # 14 | # Copyright (c) 2015-2024 Neomantra BV 15 | # Released under the MIT License, see LICENSE.txt 16 | # 17 | 18 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 19 | ARG ONLOAD_DEBIAN_TAG="noble" 20 | 21 | FROM ${ONLOAD_DEBIAN_BASE}:${ONLOAD_DEBIAN_TAG} 22 | 23 | ARG ONLOAD_DEBIAN_BASE="ubuntu" 24 | ARG ONLOAD_DEBIAN_TAG="noble" 25 | 26 | # Onload version and its md5sum 27 | ARG ONLOAD_VERSION="8.1.3.40" 28 | ARG ONLOAD_MD5SUM="2cf23e45999e4c411c32ea13e91bcc49" 29 | 30 | # Onload package URL and legacy URL 31 | # If ONLOAD_PACKAGE_URL is set, it will download and unzip the tarball from the newer packaging, 32 | # otherwise it will download the tarball from ONLOAD_LEGACY_URL as before. 33 | ARG ONLOAD_PACKAGE_URL="https://www.xilinx.com/content/dam/xilinx/publications/solarflare/onload/openonload/8-1-3-40/SF-109585-LS-44-OpenOnload-Release-Package.zip" 34 | ARG ONLOAD_LEGACY_URL="https://www.openonload.org/download/openonload-${ONLOAD_VERSION}.tgz" 35 | 36 | # When ONLOAD_WITHZF is non-empty, the build includes Solarflare's TCPDirect library. 37 | # Default is to exclude it. 38 | ARG ONLOAD_WITHZF 39 | 40 | # ZFDirect installation arguments 41 | ARG ONLOADZF_VERSION 42 | ARG ONLOADZF_PACKAGE_URL 43 | ARG ONLOADZF_MD5SUM 44 | 45 | # When ONLOAD_DISABLE_SYSCALL_HOOK is non-empty, then the build disables hooking the syscall function from libc. 46 | # Default is empty, enabling the OpenOnload's default hooking the syscall function. 47 | # 48 | # This only works with OpenOnload 201811 and newer. 49 | # 50 | # Some libraries, such as jemalloc need to invoke syscalls at startup. 51 | # This can cause infinite loops because the OpenOnload acceleration also needs malloc (via dlsym) 52 | # https://github.com/jemalloc/jemalloc/issues/443 53 | # https://github.com/jemalloc/jemalloc/issues/1426 54 | ARG ONLOAD_DISABLE_SYSCALL_HOOK 55 | 56 | # When ONLOAD_USERSPACE_ID is non-empty, it sets the userspace build md5sum ID. 57 | # Default is empty, using the actual build md5sum ID 58 | # 59 | # This is necessary when the OpenOnload build is patched (for example with ONLOAD_DISABLE_SYSCALL_HOOK). 60 | # The OpenOnload system checks for version and ID matches between userspace and the driver; 61 | # thus one may need to spoof the userspace ID. 62 | ARG ONLOAD_USERSPACE_ID 63 | 64 | # 1) Install OpenOnload build dependencies 65 | # 2) Download and verify OpenOnload from Solarflare's site 66 | # 3) Extract, build, and install onload 67 | # 4) Cleanup 68 | 69 | RUN \ 70 | DEBIAN_FRONTEND=noninteractive apt-get update -y \ 71 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 72 | autoconf \ 73 | automake \ 74 | ca-certificates \ 75 | coreutils \ 76 | curl \ 77 | ethtool \ 78 | g++ \ 79 | gcc \ 80 | kmod \ 81 | libcap-dev \ 82 | libpcap0.8-dev \ 83 | libtool-bin \ 84 | linux-libc-dev \ 85 | make \ 86 | net-tools \ 87 | patch \ 88 | perl \ 89 | python3-dev \ 90 | sed \ 91 | tar \ 92 | unzip \ 93 | util-linux \ 94 | valgrind \ 95 | wget \ 96 | && cd /tmp \ 97 | && if [ -n "${ONLOAD_PACKAGE_URL}" ] ; then \ 98 | curl -fSL "${ONLOAD_PACKAGE_URL}" -o /tmp/onload-${ONLOAD_VERSION}-package.zip \ 99 | && unzip /tmp/onload-${ONLOAD_VERSION}-package.zip \ 100 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 101 | && tar -zxf onload-${ONLOAD_VERSION}.tgz ; \ 102 | else \ 103 | curl -fSL "${ONLOAD_LEGACY_URL}" -o /tmp/onload-${ONLOAD_VERSION}.tgz \ 104 | && echo "${ONLOAD_MD5SUM} onload-${ONLOAD_VERSION}.tgz" | md5sum --check \ 105 | && tar -zxf onload-${ONLOAD_VERSION}.tgz \ 106 | && mv openonload-${ONLOAD_VERSION} onload-${ONLOAD_VERSION}; \ 107 | fi \ 108 | && cd /tmp/onload-${ONLOAD_VERSION} \ 109 | && if [ -n "${ONLOAD_DISABLE_SYSCALL_HOOK}" ] ; then \ 110 | echo 'ONLOAD_DISABLE_SYSCALL_HOOK set, disabling CI_CFG_USERSPACE_SYSCALL' \ 111 | && sed -i 's/#define CI_CFG_USERSPACE_SYSCALL 1/#define CI_CFG_USERSPACE_SYSCALL 0 \/\/ disabled by ONLOAD_DISABLE_SYSCALL_HOOK/' ./src/include/ci/internal/transport_config_opt.h ; \ 112 | fi \ 113 | && if [ -n "${ONLOAD_USERSPACE_ID}" ] ; then \ 114 | echo "ONLOAD_USERSPACE_ID set, applying userspace interface id '${ONLOAD_USERSPACE_ID}'" \ 115 | && sed -i "s/\$\$md5/${ONLOAD_USERSPACE_ID}/" src/lib/transport/ip/mmake.mk ; \ 116 | fi \ 117 | && cd scripts \ 118 | && ./onload_build --user64 \ 119 | && ./onload_install --userfiles --nobuild \ 120 | && cd /tmp \ 121 | && rm -rf onload-${ONLOAD_VERSION}* \ 122 | && if [ -z ${ONLOAD_WITHZF} ] ; then \ 123 | rm -rf /usr/include/zf /usr/bin/zf_stackdump /usr/bin/zf_debug /usr/lib/x86_64-linux-gnu/zf /usr/lib/x86_64-linux-gnu/libonload_zf* ; \ 124 | else \ 125 | if [ -n "${ONLOADZF_PACKAGE_URL}" ] ; then \ 126 | curl -fSL "${ONLOADZF_PACKAGE_URL}" -o /tmp/tcpdirect-${ONLOADZF_VERSION}-package.zip \ 127 | && unzip /tmp/tcpdirect-${ONLOADZF_VERSION}-package.zip \ 128 | && echo "${ONLOADZF_MD5SUM} tcpdirect-${ONLOADZF_VERSION}.tgz" | md5sum --check \ 129 | && tar -zxf tcpdirect-${ONLOADZF_VERSION}.tgz \ 130 | && cd tcpdirect-${ONLOADZF_VERSION} \ 131 | && ./scripts/zf_install \ 132 | && cd /tmp \ 133 | && rm -rf tcpdirect-${ONLOADZF_VERSION}* ; \ 134 | fi \ 135 | fi \ 136 | && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 137 | 138 | 139 | # Labels for introspection 140 | LABEL maintainer="Evan Wies " 141 | LABEL ONLOAD_DEBIAN_BASE="${ONLOAD_DEBIAN_BASE}" 142 | LABEL ONLOAD_DEBIAN_TAG="${ONLOAD_DEBIAN_TAG}" 143 | LABEL ONLOAD_PACKAGE_URL="${ONLOAD_PACKAGE_URL}" 144 | LABEL ONLOAD_LEGACY_URL="${ONLOAD_LEGACY_URL}" 145 | LABEL ONLOAD_VERSION="${ONLOAD_VERSION}" 146 | LABEL ONLOAD_MD5SUM="${ONLOAD_MD5SUM}" 147 | LABEL ONLOAD_WITHZF="${ONLOAD_WITHZF}" 148 | LABEL ONLOADZF_VERSION="${ONLOADZF_VERSION}" 149 | LABEL ONLOADZF_PACKAGE_URL="${ONLOADZF_PACKAGE_URL}" 150 | LABEL ONLOADZF_MD5SUM="${ONLOADZF_MD5SUM}" 151 | LABEL ONLOAD_DISABLE_SYSCALL_HOOK="${ONLOAD_DISABLE_SYSCALL_HOOK}" 152 | LABEL ONLOAD_USERSPACE_ID="${ONLOAD_USERSPACE_ID}" 153 | --------------------------------------------------------------------------------