├── .dockerignore ├── .editorconfig ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .rspec ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE.txt ├── Makefile ├── README.md ├── Vagrantfile ├── image ├── Dockerfile ├── Dockerfile.base ├── buildconfig ├── config │ ├── 30_presetup_nginx.sh │ ├── 40_presetup_env.sh │ ├── dpkg-nodocs.conf │ ├── dpkg-only-english-locale.conf │ ├── memcached.conf │ ├── nginx.conf │ ├── nginx_main_d_default.conf │ └── redis.conf ├── enable_repos.sh ├── finalize.sh ├── insecure_key ├── insecure_key.pub ├── install_base.sh ├── install_image.sh ├── jruby-10.0.0.0.sh ├── jruby-9.3.15.0.sh ├── jruby-9.4.12.0.sh ├── memcached.sh ├── nginx-passenger.sh ├── nodejs.sh ├── prepare.sh ├── python.sh ├── redis.sh ├── ruby-3.2.8.sh ├── ruby-3.3.8.sh ├── ruby-3.4.4.sh ├── ruby_support │ ├── dpkg-control │ ├── finalize.sh │ ├── install_ruby_utils.sh │ ├── mpapis-pubkey.asc │ ├── pkuczynski-pubkey.asc │ ├── prepare.sh │ ├── rvm-install.sh │ └── system-rvm-exec.sh ├── runit │ ├── memcached │ ├── nginx │ ├── nginx-log-forwarder │ ├── nginx-term │ └── redis ├── update_baseimage.sh └── utilities.sh └── test ├── customizable_image_spec.rb ├── full_image_spec.rb ├── nodejs_image_spec.rb ├── shared ├── base_system_spec.rb ├── nodejs_image_spec.rb └── ruby_image_spec.rb ├── single_ruby_images_spec.rb └── spec_helper.rb /.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | Dockerfile.base 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://EditorConfig.org 2 | 3 | root = true 4 | 5 | [Gemfile] 6 | indent_style = space 7 | indent_size = 2 8 | trim_trailing_whitespace = true 9 | 10 | [*.rb] 11 | indent_style = space 12 | indent_size = 2 13 | trim_trailing_whitespace = true 14 | 15 | [*.sh] 16 | indent_style = tab 17 | trim_trailing_whitespace = true 18 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build all images 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | defaults: 10 | run: 11 | shell: bash 12 | 13 | jobs: 14 | pre_build: 15 | name: build base_image ${{ matrix.arch.name }} 16 | strategy: 17 | fail-fast: true 18 | matrix: 19 | arch: 20 | - name: amd64 21 | runner: ubuntu-24.04 22 | - name: arm64 23 | runner: ubuntu-24.04-arm 24 | runs-on: ${{ matrix.arch.runner }} 25 | steps: 26 | - name: Checkout code 27 | uses: actions/checkout@v4 28 | - name: Purge containers 29 | run: 'docker kill $(docker ps -q) || exit 0' 30 | - name: Enable docker multiarch 31 | uses: docker/setup-qemu-action@v3 32 | - name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v3 34 | - name: Run make build_base 35 | run: make build_base 36 | env: 37 | BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} 38 | BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} 39 | - name: Export 40 | run: make export_base 41 | env: 42 | BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} 43 | BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} 44 | - name: Log in to the Container registry 45 | if: ${{ github.event.pull_request.merged || github.actor == 'CamJN' }} 46 | uses: docker/login-action@v3 47 | id: login 48 | with: 49 | registry: ghcr.io 50 | username: ${{ github.actor }} 51 | password: ${{ secrets.GITHUB_TOKEN }} 52 | - name: Push to github container registry 53 | if: ${{ success() && steps.login.conclusion != 'skipped' }} 54 | run: make push_base 55 | env: 56 | BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} 57 | BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} 58 | 59 | 60 | build: 61 | needs: pre_build 62 | name: build ${{ matrix.img }} ${{ matrix.arch.name }} 63 | strategy: 64 | fail-fast: true 65 | matrix: 66 | img: 67 | - full 68 | - customizable 69 | - nodejs 70 | - jruby94 71 | - jruby93 72 | # - ruby35 # REL: 2025-12-25 73 | - ruby34 # EOL: 2028-03-31 74 | - ruby33 # EOL: 2027-03-31 75 | - ruby32 # EOL: 2026-03-31 76 | # https://www.ruby-lang.org/en/downloads/branches/ 77 | # - python314 # REL: 2025-10-01 78 | - python313 # EOL: 2029-10-07 79 | - python312 # EOL: 2028-10-02 80 | - python311 # EOL: 2027-10-24 81 | - python310 # EOL: 2026-10-04 82 | - python39 # EOL: 2025-10-05 83 | # https://devguide.python.org/versions/ 84 | arch: 85 | - name: amd64 86 | runner: ubuntu-24.04 87 | - name: arm64 88 | runner: ubuntu-24.04-arm 89 | runs-on: ${{ matrix.arch.runner }} 90 | steps: 91 | - name: Checkout code 92 | uses: actions/checkout@v4 93 | - name: Purge containers 94 | run: 'docker kill $(docker ps -q) || exit 0' 95 | - name: Enable docker multiarch 96 | uses: docker/setup-qemu-action@v3 97 | - name: Set up Docker Buildx 98 | uses: docker/setup-buildx-action@v3 99 | - name: "Run make build_${{ matrix.img }}" 100 | run: "make build_${{ matrix.img }}" 101 | env: 102 | BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} 103 | BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} 104 | - name: Log in to the Container registry 105 | if: ${{ github.event.pull_request.merged || github.actor == 'CamJN' }} 106 | uses: docker/login-action@v3 107 | id: login 108 | with: 109 | registry: ghcr.io 110 | username: ${{ github.actor }} 111 | password: ${{ secrets.GITHUB_TOKEN }} 112 | - name: Tag as latest 113 | if: ${{ success() && steps.login.conclusion != 'skipped' }} 114 | run: "make tag_latest_${{ matrix.img }}" 115 | env: 116 | BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} 117 | BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} 118 | - name: Push to github container registry 119 | if: ${{ success() && steps.login.conclusion != 'skipped' }} 120 | run: "make push_${{ matrix.img }}" 121 | env: 122 | BUILD_AMD64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'amd64'] }} 123 | BUILD_ARM64: ${{ fromJSON('[0, 1]')[matrix.arch.name == 'arm64'] }} 124 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vagrant 3 | *_image 4 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --format d 2 | --color 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 3.1.4 (release date: not yet released) 2 | * Removed Ruby 3.1 (EOL: 2024-03-26) 3 | * Upgraded Node 20 LTS -> 22 LTS. 4 | * Upgraded image base to phusion/baseimage:noble-1.0.1 5 | * Upgraded to Ruby 3.3.8 (from 3.3.7) 6 | * Upgraded to Ruby 3.4.4 (from 3.4.2) 7 | * 8 | 9 | ## 3.1.3 (release date: 2025-04-04) 10 | * Upgraded to Ruby 3.1.7 (from 3.1.6). 11 | * Upgraded to Ruby 3.2.8 (from 3.2.7). 12 | * Upgraded to Phusion Passenger 6.0.27 (from 6.0.26). 13 | 14 | ## 3.1.2 (release date: 2025-02-19) 15 | * Upgraded to Ruby 3.4.2 (from 3.4.1). 16 | * Upgraded to Phusion Passenger 6.0.26 (from 6.0.25). 17 | 18 | ## 3.1.1 (release date: 2025-02-12) 19 | * Added a Ruby 3.4 image (Ruby 3.4.1) 20 | * Default Ruby version is now 3.4.1 21 | * Upgraded to JRuby 9.4.9.0 (from 9.4.8.0). 22 | * Upgraded to Ruby 3.3.7 (from 3.3.6). 23 | * Upgraded to Ruby 3.2.7 (from 3.2.6). 24 | * Upgraded to Phusion Passenger 6.0.25 (from 6.0.24). 25 | 26 | ## 3.1.0 (release date: 2024-12-09) 27 | * Upgraded image base to phusion/baseimage:noble-1.0.0 28 | * Upgraded to Ubuntu 24.04 LTS (Noble) 29 | - note updated compiler chain and all tools; please test your apps thoroughly 30 | * Default Python version is now 3.12 (from 3.10) 31 | * Python 2.7 and 3.7 are no longer available from the Deadsnakes PPA; we weren't providing images for either previously 32 | * Nginx version is now 1.24 (from 1.18) 33 | - changelog can be found at https://nginx.org/en/CHANGES-1.24 34 | - if you provide your own nginx.conf, please define error_log at the root scope, not the http scope; see https://github.com/phusion/passenger/issues/2541 35 | - a number of modules are no longer installed and enabled by default (mod-http-geoip2, mod-http-image-filter, mod-http-xslt-filter, mod-mail, mod-stream, mod-stream-geoip2) 36 | * Redis version is now 7.0.15 (from 6.0.16) 37 | * Added a Python 3.13 image 38 | * Dropped Python 3.8 image 39 | * Upgraded to Ruby 3.2.6 40 | * Upgraded to Ruby 3.3.6 41 | * Upgraded to Phusion Passenger 6.0.24 (from 6.0.23). 42 | 43 | ## 3.0.7 (release date: 2024-07-30) 44 | * Upgraded to Ruby 3.3.4 45 | * Upgraded to Phusion Passenger 6.0.23 (from 6.0.22). 46 | * Upgraded to Ruby 3.2.5 47 | * Upgraded to JRuby 9.4.8.0 (from 9.4.7.0). 48 | * Upgraded to JRuby 9.3.15.0 (from 9.3.14.0). 49 | 50 | ## 3.0.6 (release date: 2024-06-13) 51 | * Upgraded to Ruby 3.1.6 52 | * Upgraded to Ruby 3.3.3 53 | 54 | ## 3.0.5 (release date: 2024-05-18) 55 | * Removed Ruby 3.0 (EOL: 2024-04-23) 56 | * Upgraded to Phusion Passenger 6.0.22 (from 6.0.21). 57 | 58 | ## 3.0.4 (release date: 2024-05-17) 59 | * Upgraded to Phusion Passenger 6.0.21 (from 6.0.20). 60 | * Upgraded to JRuby 9.4.7.0 (from 9.4.6.0). 61 | 62 | ## 3.0.3 (release date: 2024-04-26) 63 | * Upgraded to JRuby 9.3.14.0 (from 9.3.13.0) 64 | * Upgraded to JRuby 9.4.6.0 (from 9.4.5.0) 65 | * Upgraded Node 18 LTS -> 20 LTS. 66 | * Fix https://github.com/rvm/rvm/issues/5449 67 | * Upgraded to Ruby 3.0.7 68 | * Upgraded to Ruby 3.1.5 69 | * Upgraded to Ruby 3.2.4 70 | * Upgraded to Ruby 3.3.1 71 | * Updated image base to phusion/baseimage:jammy-1.0.4 72 | 73 | ## 3.0.2 (release date: 2024-02-23) 74 | * Fixes an issue with passenger-full not having ruby 3.3 as default 75 | * Bumps fallback ruby to 3.3. 76 | 77 | ## 3.0.1 (release date: 2024-01-22) 78 | * Upgraded to Phusion Passenger 6.0.20 (from 6.0.19). 79 | 80 | ## 3.0.0 (release date: 2024-01-18) 81 | * Added a Ruby 3.3.0 image 82 | * Upgraded to JRuby 9.3.13.0 (from 9.3.11.0) 83 | * Upgraded to JRuby 9.4.5.0 (from 9.4.3.0) 84 | * Added versioned Python images for Python versions 3.8 to 3.12 85 | * Upgraded to Ruby 3.2.3 86 | 87 | ## 2.6.0 (release date: 2023-11-20) 88 | * Upgraded to Phusion Passenger 6.0.19 (from 6.0.18). 89 | * Switched image base to phusion/baseimage:jammy-1.0.1 90 | * Upgraded to Ubuntu 22.04 LTS (Jammy) 91 | * Default Python version is now 3.10, and Python 2.7 is no longer installed by default 92 | * Updated Python install script to be able to install any supported version from base or the Deadsnakes PPA 93 | * Updated Node.js install script to be able to install any supported version from Nodesource; default version is still 18 94 | * Created yarn and related executables whenever installing Node.js 95 | * Removed Ruby 2.7 (EOL 2023-03-31) 96 | * Compile all CRuby versions from source to ensure uniformity and YJIT capability in versions 3.1+ 97 | * Use Ruby 3.2.x by default 98 | * Upgraded to JRuby 9.3.11.0 (from 9.3.9.0) 99 | * Upgraded to JRuby 9.4.3.0 (from 9.4.0.0) 100 | 101 | ## 2.5.1 (release date: 2023-06-14) 102 | * Upgraded to Phusion Passenger 6.0.18 (from 6.0.17). 103 | * Upgraded to Ruby 2.7.8 104 | * Upgraded to Ruby 3.0.6 105 | * Upgraded to Ruby 3.1.4 106 | * Upgraded to Ruby 3.2.2 107 | * Upgraded Node 16 LTS -> 18 LTS. 108 | 109 | ## 2.5.0 (release date: 2023-01-26) 110 | * Upgraded to Phusion Passenger 6.0.17 (from 6.0.16). 111 | * Added a Ruby 3.2.0 image 112 | * Added a JRuby 9.4.0.0 image 113 | * Change to installing Node via Node Source (in Ruby images) instead of using outdated distro version, Node images already did this. 114 | 115 | ## 2.4.1 (release date: 2022-12-20) 116 | * Fixed tmpdir issue with Passenger 6.0.16 117 | 118 | ## 2.4.0 (release date: 2022-12-19) 119 | * Removed Ruby 2.6 (end of life was March 31, 2022) 120 | * Upgraded to Ruby 2.7.7 121 | * Upgraded to Ruby 3.0.5 122 | * Upgraded to Ruby 3.1.3 123 | * Upgraded to JRuby 9.3.9.0 (from 9.3.4.0) 124 | 125 | ## 2.3.1 (release date: 2022-09-19) 126 | * Upgraded to Phusion Passenger 6.0.15 (from 6.0.14). 127 | 128 | ## 2.3.0 (release date: 2022-05-10) 129 | * Upgraded to Phusion Passenger 6.0.14 (from 6.0.13). 130 | * Upgraded to Ruby 2.6.10 131 | * Upgraded to Ruby 2.7.6 132 | * Upgraded to Ruby 3.0.4 133 | * Upgraded to Ruby 3.1.2 134 | 135 | ## 2.2.0 (release date: 2022-03-29) 136 | * Upgraded to JRuby 9.3.4.0 (from 9.3.0.0). 137 | * Upgraded to Phusion Passenger 6.0.13 (from 6.0.12). 138 | * Added Ruby 3.1.1 image. 139 | 140 | ## 2.1.0 (release date: 2021-12-07) 141 | * Upgraded to Ruby 2.6.9 142 | * Upgraded to Ruby 2.7.5 143 | * Upgraded to Ruby 3.0.3 144 | * Switched the ruby shims to use rvm wrappers, to hopefully address some ruby-environment instability. 145 | 146 | ## 2.0.1 (release date: 2021-11-05) 147 | * Added tzdata for Ruby convienience. 148 | * Upgraded to Phusion Passenger 6.0.12 (from 6.0.11). 149 | * Upgraded Node 14 LTS -> 16 LTS. 150 | 151 | ## 2.0.0 (release date: 2021-10-01) 152 | * Upgraded to Phusion Passenger 6.0.11 (from 6.0.10). 153 | * Upgraded to latest baseimage. 154 | * Inlcude fix for expired Let's Encrypt root certificate. 155 | * Upgraded to JRuby 9.3.0.0 with openjdk-17. 156 | * Dropped ruby 2.4 and 2.5 images, they're EOL. 157 | 158 | ## 1.0.19 (release date: 2021-07-19) 159 | * Fixed wrong Ruby 3 being deleted (3.0.2 instead of 3.0.1 was deleted, 3.0.2 now restored and 3.0.1 removed). 160 | 161 | ## 1.0.18 (release date: 2021-07-19) 162 | * Fixed additional unwanted Rubies being present. 163 | 164 | ## 1.0.17 (release date: 2021-07-19) 165 | * Upgraded to Ruby 2.6.8 166 | * Upgraded to Ruby 2.7.4 167 | * Upgraded to Ruby 3.0.2 168 | 169 | ## 1.0.16 (release date: 2021-07-14) 170 | * Upgraded to Phusion Passenger 6.0.10 (from 6.0.9). 171 | 172 | ## 1.0.15 (release date: 2021-06-02) 173 | * Upgraded to Phusion Passenger 6.0.9 (from 6.0.8). 174 | * This version includes a workaround for issue #313, which will be fixed properly with Passsenger 6.0.10. 175 | 176 | ## 1.0.14 (release date: 2021-05-06) 177 | * Upgraded to Ruby 2.5.9 178 | * Upgraded to Ruby 2.6.7 179 | * Upgraded to Ruby 2.7.3 180 | * Upgraded to Ruby 3.0.1 181 | 182 | ## 1.0.13 (release date: 2021-04-01) 183 | * Upgraded to Phusion Passenger 6.0.8 (from 6.0.7). 184 | * Added support for Ruby 3.0.0. 185 | 186 | ## 1.0.12 (release date: 2020-11-18) 187 | * Upgraded to Phusion Passenger 6.0.7 (from 6.0.6). 188 | * Upgraded to Ruby 2.7.2 (from 2.7.1). 189 | * Default Ruby set to 2.7.2. 190 | * Upgraded to JRuby 9.2.13.0 with openjdk-14. 191 | * Upgraded to Node.js 14 LTS (from 10). 192 | * Switched image base to the baseimage-docker master tag. 193 | * Upgraded to Ubuntu 20.04. 194 | * Dropped support for Ruby 2.3. 195 | * Upgraded to Nginx 1.18.0. 196 | 197 | ## 1.0.11 (release date: 2020-07-14) 198 | * Upgraded to Phusion Passenger 6.0.6 (from 6.0.5). 199 | 200 | ## 1.0.10 (release date: 2020-05-29) 201 | * Upgraded to Ruby 2.4.10. 202 | * Upgraded to Ruby 2.5.8. 203 | * Upgraded to Ruby 2.6.6. 204 | * Upgraded to JRuby 9.2.11.1. 205 | * Added support for Ruby 2.7.1. 206 | * Default ruby set to 2.7.1. 207 | * Upgraded to Phusion Passenger 6.0.5 (from 6.0.4). 208 | 209 | ## 1.0.9 (release date: 2019-11-25) 210 | * Upgraded to Ruby 2.4.9. 211 | * Upgraded to Ruby 2.5.7. 212 | * Upgraded to Ruby 2.6.5. 213 | * Default ruby set to 2.6.5. 214 | 215 | ## 1.0.8 (release date: 2019-09-17) 216 | 217 | * Upgraded to Phusion Passenger 6.0.4 (from 6.0.3). 218 | 219 | ## 1.0.7 (release date: 2019-09-12) 220 | 221 | * Upgraded to Phusion Passenger 6.0.3 (from 6.0.2). 222 | 223 | ## 1.0.6 (release date: 2019-07-02) 224 | * Upgraded to Ruby 2.4.6. 225 | * Upgraded to Ruby 2.6.3. 226 | * reopen passenger logs in logrotate script. Closes GH-255. 227 | * Defers installing bundler to rvm. Closes GH-260. 228 | 229 | ## 1.0.5 (release date: 2019-03-15) 230 | * Upgraded to Ruby 2.5.5. 231 | 232 | ## 1.0.4 (release date: 2019-03-14) 233 | * Upgraded to Ruby 2.5.4. 234 | * Upgraded to Ruby 2.6.2. 235 | * Upgraded to JRuby 9.2.5.0. 236 | 237 | ## 1.0.3 (release date: 2019-02-25) 238 | 239 | * Upgraded to Phusion Passenger 6.0.2 (from 6.0.1). 240 | 241 | ## 1.0.2 (release date: 2019-02-06) 242 | 243 | * Update signing keys from rvm.io. Closes GH-234. 244 | * Upgraded to Phusion Passenger 6.0.1 (from 6.0.0). 245 | 246 | ## 1.0.1 (release date: 2018-11-30) 247 | 248 | * Upgraded to Phusion Passenger 6.0.0 (from 5.3.6). 249 | 250 | ## 1.0.0 (release date: 2018-11-06) 251 | 252 | * Upgraded to baseimage-docker 0.11. 253 | * Upgraded to Ubuntu 18.04. 254 | * Upgraded to Phusion Passenger 5.3.6. 255 | * Upgraded to Nginx 1.14.0. 256 | * Upgraded to Ruby 2.5.3. 257 | * Upgraded to Ruby 2.4.5. 258 | * Upgraded to Ruby 2.3.8. 259 | * Upgraded to JRuby 9.2.0.0. 260 | * Upgraded to Redis 4.0. 261 | * Dropped Ruby 2.0, 2.1 and 2.2. 262 | 263 | ## 0.9.35 (release date: 2018-08-01) 264 | 265 | * Upgraded to Phusion Passenger 5.3.4 (from 5.3.3). 266 | 267 | ## 0.9.34 (release date: 2018-06-26) 268 | 269 | * Upgraded to Phusion Passenger 5.3.3 (from 5.3.2). 270 | 271 | ## 0.9.33 (release date: 2018-06-12) 272 | 273 | * Upgraded to Phusion Passenger 5.3.2 (from 5.3.1). 274 | * Upgraded to baseimage-docker 0.10.1 (from 0.9.22). 275 | 276 | ## 0.9.32 (release date: 2018-05-14) 277 | 278 | * Upgraded to Phusion Passenger 5.3.1 (from 5.3.0). 279 | 280 | ## 0.9.31 (release date: 2018-05-09) 281 | 282 | * Upgraded to Phusion Passenger 5.3.0 (from 5.2.3). 283 | 284 | ## 0.9.30 (release date: 2018-04-06) 285 | 286 | * Upgraded to Phusion Passenger 5.2.3 (from 5.2.1). 287 | * Upgraded to Node.js 8.11.1 LTS Carbon (from 8.9.4). 288 | * Thanks to contribution by ledermann (PR 214): 289 | - Upgraded to Ruby 2.5.1 (from 2.5.0). 290 | - Upgraded to Ruby 2.4.4 (from 2.4.2). 291 | - Upgraded to Ruby 2.3.7 (from 2.3.6). 292 | - Upgraded to Ruby 2.2.10 (from 2.2.9). 293 | 294 | 295 | ## 0.9.29 (release date: 2018-02-27) 296 | 297 | * Upgraded to Phusion Passenger 5.2.1 (from 5.2.0). 298 | * Hints about app permission in container. Thanks to contribution by skunkworker (PR 206) 299 | * Thanks to contribution by ledermann (PR 204): 300 | - Added build for Ruby 2.5 (2.5.0). 301 | - Upgraded to Ruby 2.4.3 (from 2.4.2). 302 | - Upgraded to Ruby 2.3.6 (from 2.3.5). 303 | - Upgraded to Ruby 2.2.9 (from 2.2.8). 304 | * Upgraded to Node.js 8.9.4 LTS (from 7.10.0, sticking to LTS releases from now). 305 | * Updated Makefile to also push latest tag. Closes GH-197. 306 | 307 | ## 0.9.28 (release date: 2018-01-29) 308 | 309 | * Upgraded to Phusion Passenger 5.2.0 (from 5.1.12). 310 | 311 | ## 0.9.27 (release date: 2017-11-23) 312 | 313 | * Upgraded to Phusion Passenger 5.1.12 (from 5.1.11). 314 | 315 | ## 0.9.26 (release date: 2017-10-16) 316 | 317 | * Upgraded to Phusion Passenger 5.1.11 (from 5.1.8). 318 | * Upgraded to Ruby 2.4.2 (from 2.4.1). 319 | * Upgraded to Ruby 2.3.5 (from 2.3.3). 320 | * Upgraded to Ruby 2.2.8 (from 2.2.5). 321 | 322 | ## 0.9.25 (release date: 2017-08-23) 323 | 324 | * Upgraded to Phusion Passenger 5.1.8 (from 5.1.7). 325 | 326 | ## 0.9.24 (release date: 2017-08-01) 327 | 328 | * Upgraded to Phusion Passenger 5.1.7 (from 5.1.6). 329 | 330 | ## 0.9.23 (release date: 2017-07-24) 331 | 332 | * Upgraded to Phusion Passenger 5.1.6 (from 5.1.5). 333 | 334 | ## 0.9.22 (release date: 2017-06-19) 335 | 336 | * Upgraded to Phusion Passenger 5.1.5 (from 5.1.4). 337 | * Upgraded to Ruby 2.4.1 (from 2.4.0). 338 | * Upgraded to baseimage-docker 0.9.22 (from 0.9.21). 339 | 340 | ## 0.9.21 (release date: 2017-05-18) 341 | 342 | * Upgraded to Phusion Passenger 5.1.4. 343 | * Upgraded to baseimage-docker 0.9.21. 344 | * Upgraded to Node.js 7.10.0. 345 | * Fixed RVM warning about the PATH unnecessarily. Closes GH-150 and GH-178. 346 | * Fixed a race condition in nginx-log-forwarder. Closes GH-183 and GH-182. 347 | 348 | ## 0.9.20 (release date: 2017-01-10) 349 | 350 | * Upgraded to Phusion Passenger 5.1.1. 351 | * Upgraded to Ruby 2.3.3. 352 | * Added support for Ruby 2.4.0. 353 | 354 | ## 0.9.19 (release date: 2016-07-11) 355 | 356 | * Upgraded to baseimage-docker 0.9.19. 357 | * Upgraded to Ubuntu 16.04 with security updates as of July 11, 2016. 358 | * Upgraded to Phusion Passenger 5.0.29. 359 | * Upgraded Redis to 3.0. 360 | * We now use RVM to manage Ruby interpreters, instead of the Brightbox APT repository. Please see the README for rationale. 361 | * Removed support for Ruby 1.9. 362 | * Added support for Ruby 2.3.1. 363 | * Upgraded to Ruby 2.1.9 and 2.2.5. 364 | * Upgraded to JRuby 9.1.2.0. We are still on OpenJDK 8 because there is a problem with JRuby and OpenJDK 9. 365 | * Upgraded to Node.js 4.2.6. 366 | * ImageMagick is no longer included (needed by rmagick and minimagick). This shaves around 120 MB. If you need it you should install it yourself. 367 | * Man pages, documentation and non-English locales are now removed. This shaves around 64 MB. 368 | * Gzip support in Nginx is now correctly enabled by default. Closes GH-115. 369 | * Nginx log rotation has now been fixed. Closes GH-113. 370 | 371 | ## 0.9.18 (release date: 2015-12-08) 372 | 373 | * Upgraded to Phusion Passenger 5.0.22. 374 | * Upgraded to baseimage-docker 0.9.17. 375 | * Upgraded to Ruby 2.1.7 and 2.2.3. 376 | * Upgraded to JRuby 9.0.4.0. 377 | * Upgraded to Node.js 0.12.9. 378 | 379 | ## 0.9.17 (release date: 2015-08-04) 380 | 381 | * Upgraded to Phusion Passenger 5.0.15. 382 | * Upgraded to JRuby 9.0.0.0. Closes GH-99. 383 | * Fixed passenger-full containing Node.js 0.12 instead of 0.10. Closes GH-96. 384 | 385 | ## 0.9.16 (release date: 2015-07-15) 386 | 387 | * The latest OpenSSL updates have been pulled in. This fixes [CVE-2015-1793](http://openssl.org/news/secadv_20150709.txt). Upgrading is strongly recommended. 388 | * Upgraded to baseimage-docker 0.9.17. 389 | * Upgraded to Phusion Passenger 5.0.14. 390 | * Upgraded to Ruby 2.1.6 and 2.2.2. 391 | * Upgraded to JRuby 1.7.21. 392 | * Upgraded to Node.js 0.12.7. 393 | * Fixed Ruby tool shebang lines in the passenger-full image variant. Closes GH-78. 394 | 395 | ## 0.9.15 (release date: 2015-01-23) 396 | 397 | * Upgraded to baseimage-docker 0.9.16. 398 | * Upgraded to Phusion Passenger 4.0.58. 399 | * Support for Ruby 2.2. Closes GH-64. 400 | * Support for JRuby 1.7.18. Thanks to Per Lundberg. Closes GH-65. 401 | * It is now possible to allow users to override the value of `RAILS_ENV`, `NODE_ENV` etc at runtime. Please refer to the documentation for details ("Application environment name (`RAILS_ENV`, `NODE_ENV`, etc)"). 402 | * In order to work around [an AUFS bug](https://github.com/docker/docker/issues/783), the `/build` directory has been renamed to `/pd_build`. 403 | * Pups has been removed. 404 | * Non-Ruby 1.9 images no longer contain Ruby 1.9. This is because a bug in the Phusion Passenger Debian packages has been fixed. 405 | * Qt has been removed from the Ruby images because it's not used by a lot of Ruby apps. This reduces the image size by ~150 MB. Closes GH-52. 406 | * Documentation updates, some of which are contributed by Olle Jonsson. Closes GH-33. Closes GH-62. 407 | 408 | ## 0.9.14 (release date: 2014-10-03) 409 | 410 | * Upgraded to baseimage-docker 0.9.15, which fixes the setuid bit on /usr/bin/sudo. This problem was caused by Docker bug #6828. 411 | 412 | ## 0.9.13 (release date: 2014-10-01) 413 | 414 | * Upgraded to baseimage-docker 0.9.14. This applies all the latest Ubuntu security updates, and patches Shellshock among other things. 415 | * Upgraded to Phusion Passenger 4.0.53 and Nginx 1.6.2. 416 | * Some documentation updates by Martijn Heemels. 417 | 418 | ## 0.9.12 (release date: 2014-08-22) 419 | 420 | * Upgraded to baseimage-docker 0.9.13. 421 | * Upgraded to Phusion Passenger 4.0.49 and Nginx 1.6.1. 422 | * Fixed some bugs in ruby-switch. Thanks to John C Banks. Closes GH-47. 423 | * Code cleanups thanks to Aris Pikeas. Closes GH-43. 424 | * Fixed passenger-customizable build scripts from failing due to absence of `ruby_switch`. Closes GH-34. 425 | * The build scripts in passenger-customizable now automatically run `apt-get update` when necessary. 426 | * Development headers are now included by default in all Ruby images. Closes GH-44. 427 | 428 | ## 0.9.11 (release date: 2014-06-25) 429 | 430 | * Upgraded to baseimage-docker 0.9.11. 431 | * Upgraded to Phusion Passenger 4.0.45. 432 | * The baseimage-docker insecure key was erroneously still installed by default for the 'app' user. It has now been removed. 433 | * The 'full' image didn't properly include Python 2.7. This has been fixed. 434 | * Nginx error logs are now forwarded to the Docker logs. 435 | 436 | ## 0.9.10 (release date: 2014-05-13) 437 | 438 | * Upgraded to baseimage-docker 0.9.10 and Ubuntu 14.04. 439 | * Upgraded to Nginx 1.6.0. 440 | * Upgraded to Phusion Passenger 4.0.42. 441 | * Ruby 1.8 support has been removed because it is no longer available on Ubuntu 14.04. 442 | * It is now possible to put additional Nginx configuration in the directory /etc/nginx/main.d. This works like /etc/nginx/conf.d, but config files are included in the main context, not in the http context. It is ideal for adding things like `env` directives. Thanks to javereec for documentation contribution. 443 | * The Phusion Passenger native extension is now precompiled for for all Ruby interpreters. 444 | 445 | ## 0.9.9 (release date: 2014-03-25) 446 | 447 | * Upgraded to baseimage-docker 0.9.9. 448 | * Upgraded to Phusion Passenger 4.0.40. 449 | * Upgraded to Nginx 1.4.7. This also fixes several Nginx vulnerabilities. 450 | * Ports 80 and 443 are now by default made available for Docker linking. 451 | * Redis and Memcached have been reintroduced, but only in the `passenger-customizable` and `passenger-full` images. 452 | * Various minor improvements. (Amir Gur) 453 | 454 | ## 0.9.8 (release date: 2014-02-26) 455 | 456 | * Upgraded to baseimage-docker 0.9.8. 457 | 458 | ## 0.9.7 (release date: 2014-02-25) 459 | 460 | * Upgraded to baseimage-docker 0.9.7. 461 | 462 | ## 0.9.6 (release date 2013-02-06) 463 | 464 | * Upgraded to baseimage-docker 0.9.5. 465 | 466 | ## 0.9.5 (release date 2013-02-03) 467 | 468 | * Upgraded to baseimage-docker 0.9.4, which fixes a syslog-ng startup problem. 469 | 470 | ## 0.9.4 (release date 2013-02-01) 471 | 472 | * Upgraded to Phusion Passenger 4.0.37, which improves Node.js and Meteor support and fixes many bugs. 473 | * Upgraded to baseimage-docker 0.9.3. 474 | * Added support for Ruby 2.1. This is available in the phusion/passenger-ruby21 image. 475 | * Reintroduced the phusion/passenger-full image. 476 | 477 | ## 0.9.3 (release date 2013-12-12) 478 | 479 | * Upgraded to Phusion Passenger 4.0.28. 480 | * Upgraded to baseimage-docker 0.9.2. 481 | * passenger-docker has been split into multiple versions, each one targeted at only a single programming language. The following images are now available on the Docker index: phusion/passenger-ruby18, phusion/passenger-ruby19, phusion/passenger-ruby20, phusion/passenger-python, phusion/passenger-nodejs. There is also a phusion/passenger-customizable image which allows you to easily have multiple languages in a single container. 482 | 483 | ## 0.9.2 (release date 2013-11-13) 484 | 485 | * Fixed the pups wrapper script. 486 | 487 | ## 0.9.1 (release date 2013-11-12) 488 | 489 | * Upgraded to baseimage-docker 0.9.1. 490 | 491 | ## 0.9.0 (release date 2013-11-12) 492 | 493 | * Initial release. 494 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at Phusion: 38 | 39 | [FloorD](https://github.com/floord) (she/her), floor@phusion.nl, English / Dutch / German 40 | 41 | [Scarhand](https://github.com/scarhand) (he/his), niels@phusion.nl, English / Dutch 42 | 43 | The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 44 | 45 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 46 | 47 | ## Attribution 48 | 49 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 50 | 51 | [homepage]: http://contributor-covenant.org 52 | [version]: http://contributor-covenant.org/version/1/4/ 53 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to passenger-docker 2 | 3 | First off, thank you for considering contributing to passenger-docker. It's people like you that make Open Source a great place to be. Now let's make sure your contribution gets merged! 4 | 5 | ### Contributions we happily welcome 6 | We look for contributions improving documentation, bug triaging, or writing tutorials, as well as bug reports and patches. 7 | 8 | ### Contributions we are not looking for 9 | Please, don't use the issue tracker for support questions. Instead [consider Stack Overflow](https://stackoverflow.com/search?tab=newest&q=passenger%20docker). 10 | 11 | ## Ground Rules 12 | 13 | ### Your first contribution 14 | Not sure what you can help us out with? Check our [list of issues and feature requests](https://github.com/phusion/passenger-docker/issues) first. 15 | 16 | #### Is this your first contribution to Open Source? 17 | 18 | Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github). 19 | 20 | At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first :smile_cat: 21 | 22 | If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge. 23 | 24 | ### How to submit a contribution 25 | Please follow the steps below to make your contribution to passenger-docker. 26 | 27 | 1. Fork the repository 28 | 2. Clone or download the repository 29 | 3. Write your code 30 | 4. Push your code and create a Pull Request 31 | 5. Wait patiently while we review your changes 32 | 6. Party :tada: 33 | 34 | ### Found a security flaw? 35 | If you find a security vulnerability, do NOT open an issue. Please send an email to info@phusion.nl instead. 36 | 37 | In order to determine whether you are dealing with a security issue, ask yourself these two questions: 38 | * Can I access something that's not mine, or something I shouldn't have access to? 39 | * Can I disable something for other people? 40 | 41 | If the answer to either of those two questions are "yes", then you're probably dealing with a security issue. 42 | 43 | ### How to file a bug report 44 | When filing an issue, make sure to answer these five questions: 45 | 46 | 1. What does your software stack look like? 47 | 2. What operating system and processor architecture are you using? 48 | 3. What did you do? :scream: 49 | 4. What did you expect to see? 50 | 5. What did you see instead? 51 | 52 | ## Code review process 53 | passenger-docker is semi-regularly released, often in conjunction with a [Passenger](https://github.com/phusion/passenger/) release. 54 | 55 | ## Community 56 | passenger-docker is a Phusion Passenger project. [Theaxiom](https://github.com/Theaxiom) took over the role of core maintainer. 57 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rake' 4 | gem 'rspec-core' 5 | gem 'rspec-expectations' 6 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | diff-lcs (1.4.4) 5 | rake (13.0.6) 6 | rspec-core (3.10.1) 7 | rspec-support (~> 3.10.0) 8 | rspec-expectations (3.10.1) 9 | diff-lcs (>= 1.2.0, < 2.0) 10 | rspec-support (~> 3.10.0) 11 | rspec-support (3.10.2) 12 | 13 | PLATFORMS 14 | ruby 15 | 16 | DEPENDENCIES 17 | rake 18 | rspec-core 19 | rspec-expectations 20 | 21 | BUNDLED WITH 22 | 1.17.3 23 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 Phusion Holding B.V. 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 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | ifeq ($(GITHUB_ACTIONS),true) 4 | REGISTRY = ghcr.io 5 | else 6 | REGISTRY = docker.io 7 | endif 8 | 9 | NAME ?= $(REGISTRY)/phusion/passenger 10 | VERSION ?= 3.1.4 11 | 12 | # NAME and/or VERSION can be overriden during build if you are building locally to push to your own repository 13 | # example: 14 | # login to your ECR repo, then 15 | # NAME="YOURID.dkr.ecr.us-west-2.amazonaws.com/passenger" VERSION=2.5.1.4 BUILD_ARM64=0 make -j1 build_ruby32 push_ruby32 16 | # This will build and push YOURID.dkr.ecr.us-west-2.amazonaws.com/passenger-ruby32:2.5.1.4-amd64 17 | # and YOURID.dkr.ecr.us-west-2.amazonaws.com/passenger-ruby32:2.5.1.4:latest-amd64 18 | 19 | # Extra flags for docker build, usable via environment variable. 20 | # Example: `export EXTRA_BUILD_FLAGS=--no-cache; make build_all` 21 | EXTRA_BUILD_FLAGS?= 22 | 23 | # Allow conditionally building multiple architectures 24 | # example: BUILD_ARM64=0 make build_customizable ; only builds amd64 image 25 | # defaults to building all specified images for both amd64 and arm64 26 | ifeq ($(BUILD_AMD64),0) 27 | _build_amd64 := 0 28 | else 29 | _build_amd64 := 1 30 | endif 31 | 32 | ifeq ($(BUILD_ARM64),0) 33 | _build_arm64 := 0 34 | else 35 | _build_arm64 := 1 36 | endif 37 | 38 | # test if we're running in an interactive shell (vs gh actions) 39 | INTERACTIVE:=$(shell [ -t 0 ] && echo 1) 40 | 41 | .PHONY: all build_base build_all tag_latest cross_tag push release labels clean clean_images 42 | 43 | FORCE: 44 | 45 | # when adding a cRuby image, also update image/nginx-passenger.sh and image/ruby-support/finalize.sh 46 | SPECIAL_IMAGES := customizable full 47 | CRUBY_IMAGES := ruby32 ruby33 ruby34 48 | PYTHON_IMAGES := python39 python310 python311 python312 python313 49 | MISC_IMAGES := jruby93 jruby94 jruby100 nodejs 50 | 51 | ALL_IMAGES := $(SPECIAL_IMAGES) $(MISC_IMAGES) $(CRUBY_IMAGES) $(PYTHON_IMAGES) 52 | 53 | all: build_all 54 | 55 | # waits are to ensure that we only compile each version of ruby once per arch even if running in parallel 56 | build_all: \ 57 | build_customizable \ 58 | .WAIT \ 59 | $(foreach image, $(CRUBY_IMAGES), build_${image}) \ 60 | .WAIT \ 61 | $(foreach image, $(MISC_IMAGES), build_${image}) \ 62 | .WAIT \ 63 | $(foreach image, $(PYTHON_IMAGES), build_${image}) \ 64 | build_full 65 | 66 | build_base: 67 | rm -rf base_image 68 | cp -pR image base_image 69 | ifeq ($(_build_amd64),1) 70 | docker rmi $(NAME)-base:latest-amd64 || true 71 | docker buildx build --progress=plain --platform linux/amd64 $(EXTRA_BUILD_FLAGS) --build-arg ARCH=amd64 -t $(NAME)-base:latest-amd64 -f image/Dockerfile.base base_image --no-cache --load 72 | endif 73 | ifeq ($(_build_arm64),1) 74 | docker rmi $(NAME)-base:latest-arm64 || true 75 | docker buildx build --progress=plain --platform linux/arm64 $(EXTRA_BUILD_FLAGS) --build-arg ARCH=arm64 -t $(NAME)-base:latest-arm64 -f image/Dockerfile.base base_image --no-cache --load 76 | endif 77 | rm -rf base_image 78 | 79 | export_base: 80 | ifeq ($(_build_amd64),1) 81 | docker save $(NAME)-base:latest-amd64 | gzip > passenger-base-amd64.tar.gz 82 | endif 83 | ifeq ($(_build_arm64),1) 84 | docker save $(NAME)-base:latest-arm64 | gzip > passenger-base-arm64.tar.gz 85 | endif 86 | 87 | build_%: 88 | ifeq ($(INTERACTIVE),1) 89 | build_%: build_base 90 | endif 91 | rm -rf $*_image 92 | cp -pR image $*_image 93 | @if [ "${*}" != "full" ] && [ "${*}" != "customizable" ]; then \ 94 | echo "${*}=1" >> ${*}_image/buildconfig; \ 95 | fi 96 | @if [ "${*}" == "full" ]; then \ 97 | for i in ${CRUBY_IMAGES}; do echo "$${i}=1" >> ${*}_image/buildconfig; done; \ 98 | for i in ${MISC_IMAGES}; do echo "$${i}=1" >> ${*}_image/buildconfig; done; \ 99 | echo python312=1 >> ${*}_image/buildconfig; \ 100 | echo redis=1 >> ${*}_image/buildconfig; \ 101 | echo memcached=1 >> ${*}_image/buildconfig; \ 102 | fi 103 | @if [ "${*}" != "customizable" ]; then \ 104 | echo final=1 >> ${*}_image/buildconfig; \ 105 | fi 106 | ifeq ($(_build_amd64),1) 107 | docker buildx build --progress=plain --platform linux/amd64 $(EXTRA_BUILD_FLAGS) --build-arg NAME=$(NAME) --build-arg ARCH=amd64 -t $(NAME)-$*:$(VERSION)-amd64 --rm $*_image --load 108 | endif 109 | ifeq ($(_build_arm64),1) 110 | docker buildx build --progress=plain --platform linux/arm64 $(EXTRA_BUILD_FLAGS) --build-arg NAME=$(NAME) --build-arg ARCH=arm64 -t $(NAME)-$*:$(VERSION)-arm64 --rm $*_image --load 111 | endif 112 | 113 | labels: $(foreach image, $(ALL_IMAGES), label_${image}) 114 | 115 | label_%: FORCE 116 | ifeq ($(_build_amd64),1) 117 | @echo $(NAME)-$*:$(VERSION)-amd64 $(NAME)-$*:latest-amd64 118 | endif 119 | ifeq ($(_build_arm64),1) 120 | @echo $(NAME)-$*:$(VERSION)-arm64 $(NAME)-$*:latest-arm64 121 | endif 122 | 123 | pull: $(foreach image, $(ALL_IMAGES), pull_${image}) 124 | 125 | pull_%: FORCE 126 | ifeq ($(_build_amd64),1) 127 | docker pull $(NAME)-$*:$(VERSION)-amd64 128 | endif 129 | ifeq ($(_build_arm64),1) 130 | docker pull $(NAME)-$*:$(VERSION)-arm64 131 | endif 132 | 133 | cross_tag: $(foreach image, $(ALL_IMAGES), cross_tag_${image}) 134 | 135 | cross_tag_%: FORCE 136 | ifeq ($(_build_amd64),1) 137 | docker tag ghcr.io/phusion/passenger-$*:$(VERSION)-amd64 $(NAME)-$*:$(VERSION)-amd64 138 | endif 139 | ifeq ($(_build_arm64),1) 140 | docker tag ghcr.io/phusion/passenger-$*:$(VERSION)-arm64 $(NAME)-$*:$(VERSION)-arm64 141 | endif 142 | 143 | tag_latest: $(foreach image, $(ALL_IMAGES), tag_latest_${image}) 144 | 145 | tag_latest_%: FORCE 146 | ifeq ($(_build_amd64),1) 147 | docker tag $(NAME)-$*:$(VERSION)-amd64 $(NAME)-$*:latest-amd64 148 | endif 149 | ifeq ($(_build_arm64),1) 150 | docker tag $(NAME)-$*:$(VERSION)-arm64 $(NAME)-$*:latest-arm64 151 | endif 152 | 153 | push: $(foreach image, $(ALL_IMAGES), push_${image}) 154 | 155 | push_%: FORCE 156 | ifeq ($(_build_amd64),1) 157 | docker push $(NAME)-$*:latest-amd64 158 | if [ base != $* ]; then docker push $(NAME)-$*:$(VERSION)-amd64; fi 159 | endif 160 | ifeq ($(_build_arm64),1) 161 | docker push $(NAME)-$*:latest-arm64 162 | if [ base != $* ]; then docker push $(NAME)-$*:$(VERSION)-arm64; fi 163 | endif 164 | 165 | release: $(foreach image, $(ALL_IMAGES), release_${image}) 166 | test -z "$$(git status --porcelain)" || git commit -am "$(VERSION)" && git tag "rel-$(VERSION)" && git push origin "rel-$(VERSION)" 167 | 168 | release_%: push_% 169 | docker manifest rm $(NAME)-$*:latest || true 170 | docker manifest create $(NAME)-$*:$(VERSION) $(NAME)-$*:$(VERSION)-amd64 $(NAME)-$*:$(VERSION)-arm64 171 | docker manifest create $(NAME)-$*:latest $(NAME)-$*:latest-amd64 $(NAME)-$*:latest-arm64 172 | docker manifest push $(NAME)-$*:$(VERSION) 173 | docker manifest push $(NAME)-$*:latest 174 | 175 | clean: 176 | rm -rf *_image 177 | 178 | clean_images: $(foreach image, $(ALL_IMAGES), clean_image_${image}) FORCE 179 | docker rmi $(NAME)-base:latest-amd64 phusion/passenger-base:latest-amd64 || true 180 | docker rmi $(NAME)-base:latest-arm64 phusion/passenger-base:latest-arm64 || true 181 | 182 | clean_image_%: FORCE 183 | docker rmi $(NAME)-$*:latest-amd64 $(NAME)-$*:$(VERSION)-amd64 || true 184 | docker rmi $(NAME)-$*:latest-arm64 $(NAME)-$*:$(VERSION)-arm64 || true 185 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker base images for Ruby, Python, Node.js and Meteor web apps 2 | 3 | Docker 4 | 5 | Passenger-docker is a set of [Docker](https://www.docker.com) images meant to serve as good bases for **Ruby, Python, Node.js and Meteor** web app images. In line with [Phusion Passenger](https://www.phusionpassenger.com/)'s goal, passenger-docker's goal is to make Docker image building for web apps much easier and faster. 6 | 7 | Why is this image called "passenger"? It's to represent the ease: you just have to sit back and watch most of the heavy lifting being done for you. Passenger-docker is part of a larger and more ambitious project: to make web app deployment ridiculously simple, to heights never achieved before. 8 | 9 | **Relevant links:** 10 | [Github](https://github.com/phusion/passenger-docker) | 11 | [Docker registry](https://registry.hub.docker.com/r/phusion/passenger-full/) | 12 | [Discussion forum](https://groups.google.com/d/forum/passenger-docker) | 13 | [Twitter/X](https://twitter.com/phusion_nl) | 14 | [Blog](http://blog.phusion.nl/) 15 | 16 | --------------------------------------- 17 | 18 | **Table of contents** 19 | 20 | * [Why use passenger-docker?](#why_use) 21 | * [About passenger-docker](#about) 22 | * [What's included?](#whats_included) 23 | * [Memory efficiency](#memory_efficiency) 24 | * [Image variants](#image_variants) 25 | * [Inspecting the image](#inspecting_the_image) 26 | * [Using the image as base](#using) 27 | * [Getting started](#getting_started) 28 | * [The `app` user](#app_user) 29 | * [Using Nginx and Passenger](#nginx_passenger) 30 | * [Adding your web app to the image](#adding_web_app) 31 | * [Configuring Nginx](#configuring_nginx) 32 | * [Setting environment variables in Nginx](#nginx_env_vars) 33 | * [Application environment name (`RAILS_ENV`, `NODE_ENV`, etc)](#app_env_name) 34 | * [Using Redis](#redis) 35 | * [Using memcached](#memcached) 36 | * [Additional daemons](#additional_daemons) 37 | * [Using Ruby](#using_ruby) 38 | * [Selecting a default Ruby version](#selecting_default_ruby) 39 | * [Running a command with a specific Ruby version](#running_command_with_specific_ruby_version) 40 | * [Default wrapper scripts](default_ruby_wrapper_scripts) 41 | * [Running scripts during container startup](#running_startup_scripts) 42 | * [Upgrading the operating system inside the container](#upgrading_os) 43 | * [Upgrading Passenger to the latest version](#upgrading_passenger) 44 | * [Container administration](#container_administration) 45 | * [Running a one-shot command in a new container](#oneshot) 46 | * [Running a command in an existing, running container](#run_inside_existing_container) 47 | * [Login to the container via `docker exec`](#login_docker_exec) 48 | * [Usage](#docker_exec) 49 | * [Login to the container via SSH](#login_ssh) 50 | * [Enabling SSH](#enabling_ssh) 51 | * [About SSH keys](#ssh_keys) 52 | * [Using the insecure key for one container only](#using_the_insecure_key_for_one_container_only) 53 | * [Enabling the insecure key permanently](#enabling_the_insecure_key_permanently) 54 | * [Using your own key](#using_your_own_key) 55 | * [The `docker-ssh` tool](#docker_ssh) 56 | * [Inspecting the status of your web app](#inspecting_web_app_status) 57 | * [Logs](#logs) 58 | * [Switching to Phusion Passenger Enterprise](#enterprise) 59 | * [Building the image yourself](#building) 60 | * [FAQ](#faq) 61 | * [Why are you using RVM? Why not rbenv or chruby?](#why_rvm) 62 | * [Contributing](#contributing) 63 | * [Conclusion](#conclusion) 64 | 65 | --------------------------------------- 66 | 67 | 68 | ## Why use passenger-docker? 69 | 70 | Why use passenger-docker instead of doing everything yourself in Dockerfile? 71 | 72 | * Your Dockerfile can be smaller. 73 | * It reduces the time needed to write a correct Dockerfile. You won't have to worry about the base system and the stack, you can focus on just your app. 74 | * It sets up the base system **correctly**. It's very easy to get the base system wrong, but this image does everything correctly. [Learn more.](https://github.com/phusion/baseimage-docker#contents) 75 | * It drastically reduces the time needed to run `docker build`, allowing you to iterate your Dockerfile more quickly. 76 | * It reduces download time during redeploys. Docker only needs to download the base image once: during the first deploy. On every subsequent deploys, only the changes you make on top of the base image are downloaded. 77 | 78 | 79 | ## About the image 80 | 81 | 82 | ### What's included? 83 | 84 | *Passenger-docker is built on top of a solid base: [baseimage-docker](http://phusion.github.io/baseimage-docker/).* 85 | 86 | Basics (learn more at [baseimage-docker](http://phusion.github.io/baseimage-docker/)): 87 | 88 | * Ubuntu 24.04 LTS as base system. 89 | * A **correct** init process ([learn more](http://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/)). 90 | * Fixes APT incompatibilities with Docker. 91 | * syslog-ng. 92 | * The cron daemon. 93 | * [Runit](http://smarden.org/runit/) for service supervision and management. 94 | 95 | Language support: 96 | 97 | * Ruby 3.2.8, 3.3.8, 3.4.4 and JRuby 9.3.15.0 and 9.4.9.0. 98 | * RVM is used to manage Ruby versions. [Why RVM?](#why_rvm) 99 | * 3.4.4 is configured as the default. 100 | * JRuby is installed from source, but we register an APT entry for it. 101 | * JRuby uses OpenJDK 17. 102 | * Python 3.12, or any version provided by the Deadsnakes PPA (currently 3.8, 3.9, 3.10, and 3.11; see https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa). 103 | * Node.js 20 by default, or any version provided by Nodesource (currently 18, 20, 21, 22; see https://github.com/nodesource/distributions). 104 | * A build system, git, and development headers for many popular libraries, so that the most popular Ruby, Python and Node.js native extensions can be compiled without problems. 105 | 106 | Web server and application server: 107 | 108 | * Nginx 1.24. Disabled by default. 109 | * [Phusion Passenger 6](https://www.phusionpassenger.com/). Disabled by default (because it starts along with Nginx). 110 | * This is a fast and lightweight tool for simplifying web application integration into Nginx. 111 | * It adds many production-grade features, such as process monitoring, administration and status inspection. 112 | * It replaces (G)Unicorn, Thin, Puma, uWSGI. 113 | * Node.js users: [watch this 4 minute intro video](http://vimeo.com/phusionnl/review/84945384/73fe7432ee) to learn why it's cool and useful. 114 | 115 | Auxiliary services and tools: 116 | 117 | * Redis 7.0. Not installed by default. 118 | * Memcached. Not installed by default. 119 | 120 | 121 | ### Memory efficiency 122 | 123 | Passenger-docker is very lightweight on memory. In its default configuration, it only uses 10 MB of memory (the memory consumed by bash, runit, syslog-ng, etc). 124 | 125 | 126 | ### Image variants 127 | 128 | Passenger-docker consists of several images, each one tailor made for a specific user group. 129 | 130 | **Ruby images** 131 | 132 | * `phusion/passenger-ruby32` - Ruby 3.2. 133 | * `phusion/passenger-ruby33` - Ruby 3.3. 134 | * `phusion/passenger-ruby34` - Ruby 3.4. 135 | * `phusion/passenger-jruby93` - JRuby 9.3. 136 | * `phusion/passenger-jruby94` - JRuby 9.4. 137 | 138 | Python images 139 | 140 | * `phusion/passenger-python39` - Python 3.9 141 | * `phusion/passenger-python310` - Python 3.10 142 | * `phusion/passenger-python311` - Python 3.11 143 | * `phusion/passenger-python312` - Python 3.12 144 | * `phusion/passenger-python313` - Python 3.13 145 | 146 | **Node.js and Meteor images** 147 | 148 | * `phusion/passenger-nodejs` - Node.js 20. 149 | 150 | **Other images** 151 | 152 | * `phusion/passenger-full` - Contains everything in the above images. Ruby, Python, Node.js, all in a single image for your convenience. 153 | * `phusion/passenger-customizable` - Contains only the base system, as described in ["What's included?"](#whats_included). Specific Ruby, Python, and Node.js versions are not preinstalled beyond what is needed for the image to run, or which are inherited from the baseimage. This image is meant to be further customized through your Dockerfile. For example, using this image you can create a custom image that contains Ruby 3.2 and Node.js. 154 | 155 | In the rest of this document we're going to assume that the reader will be using `phusion/passenger-full`, unless otherwise stated. Simply substitute the name if you wish to use another image. 156 | 157 | 158 | ## Inspecting the image 159 | 160 | To look around in the image, run: 161 | 162 | docker run --rm -t -i phusion/passenger-full bash -l 163 | 164 | You don't have to download anything manually. The above command will automatically pull the passenger-docker image from the Docker registry. 165 | 166 | 167 | ## Using the image as base 168 | 169 | 170 | ### Getting started 171 | 172 | There are several images, e.g. `phusion/passenger-ruby32` and `phusion/passenger-nodejs`. Choose the one you want. See [Image variants](#image_variants). 173 | 174 | So put the following in your Dockerfile: 175 | 176 | ```dockerfile 177 | # Use phusion/passenger-full as base image. To make your builds reproducible, make 178 | # sure you lock down to a specific version, not to `latest`! 179 | # See https://github.com/phusion/passenger-docker/blob/master/CHANGELOG.md for 180 | # a list of version numbers. 181 | FROM phusion/passenger-full: 182 | # Or, instead of the 'full' variant, use one of these: 183 | #FROM phusion/passenger-ruby31: 184 | #FROM phusion/passenger-ruby32: 185 | #FROM phusion/passenger-ruby33: 186 | #FROM phusion/passenger-ruby34: 187 | #FROM phusion/passenger-python39: 188 | #FROM phusion/passenger-python310: 189 | #FROM phusion/passenger-python311: 190 | #FROM phusion/passenger-python312: 191 | #FROM phusion/passenger-python313: 192 | #FROM phusion/passenger-jruby93: 193 | #FROM phusion/passenger-jruby94: 194 | #FROM phusion/passenger-nodejs: 195 | #FROM phusion/passenger-customizable: 196 | 197 | # Set correct environment variables. 198 | ENV HOME /root 199 | 200 | # Use baseimage-docker's init process. 201 | CMD ["/sbin/my_init"] 202 | 203 | # If you're using the 'customizable' variant, you need to explicitly opt-in 204 | # for features. 205 | # 206 | # N.B. these images are based on https://github.com/phusion/baseimage-docker, 207 | # so anything it provides is also automatically on board in the images below 208 | # (e.g. older versions of Ruby, Node, Python). 209 | # 210 | # Uncomment the features you want: 211 | # 212 | # Node.js and Meteor standalone support (not needed if you will also be installing Ruby, unless you need a version other than the default) 213 | #RUN /pd_build/nodejs.sh 20 214 | # 215 | # Ruby support 216 | #RUN /pd_build/ruby-3.2.*.sh 217 | #RUN /pd_build/ruby-3.3.*.sh 218 | #RUN /pd_build/ruby-3.4.*.sh 219 | #RUN /pd_build/jruby-9.3.*.sh 220 | #RUN /pd_build/jruby-9.4.*.sh 221 | # 222 | # Python support 223 | #RUN /pd_build/python.sh 3.12 224 | 225 | # ...put your own build instructions here... 226 | 227 | # Clean up APT when done. 228 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 229 | ``` 230 | 231 | 232 | ### The `app` user 233 | 234 | The image has an `app` user with UID 9999 and home directory `/home/app`. Your application is supposed to run as this user. Even though Docker itself provides some isolation from the host OS, running applications without root privileges is good security practice. 235 | 236 | Your application should be placed inside /home/app. 237 | 238 | Note: when copying your application, make sure to set the ownership of the application directory to `app` by calling `COPY --chown=app:app /local/path/of/your/app /home/app/webapp` 239 | 240 | 241 | ### Using Nginx and Passenger 242 | 243 | Before using Passenger, you should familiarise yourself with it by [reading its documentation](https://www.phusionpassenger.com). 244 | 245 | Nginx and Passenger are disabled by default. Enable them like so: 246 | 247 | ```dockerfile 248 | RUN rm -f /etc/service/nginx/down 249 | ``` 250 | 251 | 252 | #### Adding your web app to the image 253 | 254 | Passenger works like a `mod_ruby`, `mod_nodejs`, etc. It changes Nginx into an application server and runs your app from Nginx. So to get your web app up and running, you just have to add a virtual host entry to Nginx which describes where your app is, and Passenger will take care of the rest. 255 | 256 | You can add a virtual host entry (`server` block) by placing a .conf file in the directory `/etc/nginx/sites-enabled`. For example: 257 | 258 | # /etc/nginx/sites-enabled/webapp.conf: 259 | ```nginx 260 | server { 261 | listen 80; 262 | server_name www.webapp.com; 263 | root /home/app/webapp/public; 264 | 265 | # The following deploys your Ruby/Python/Node.js/Meteor app on Passenger. 266 | 267 | # Not familiar with Passenger, and used (G)Unicorn/Thin/Puma/pure Node before? 268 | # Yes, this is all you need to deploy on Passenger! All the reverse proxying, 269 | # socket setup, process management, etc are all taken care automatically for 270 | # you! Learn more at https://www.phusionpassenger.com/. 271 | passenger_enabled on; 272 | passenger_user app; 273 | 274 | # If this is a Ruby app, specify a Ruby version: 275 | # For Ruby 3.4 276 | passenger_ruby /usr/bin/ruby3.4; 277 | # For Ruby 3.3 278 | passenger_ruby /usr/bin/ruby3.3; 279 | # For Ruby 3.2 280 | passenger_ruby /usr/bin/ruby3.2; 281 | 282 | # For Python ie. Django 283 | passenger_app_type wsgi; 284 | passenger_startup_file passenger_wsgi.py; # (contents example: https://gist.github.com/ajhodgson/96c51dba349697e5c7e46027cc530434) 285 | 286 | # For Node.js 287 | passenger_app_type node; 288 | passenger_startup_file app.js; 289 | 290 | # Nginx has a default limit of 1 MB for request bodies, which also applies 291 | # to file uploads. The following line enables uploads of up to 50 MB: 292 | client_max_body_size 50M; 293 | } 294 | ``` 295 | 296 | # Dockerfile: 297 | ```dockerfile 298 | RUN rm /etc/nginx/sites-enabled/default 299 | ADD webapp.conf /etc/nginx/sites-enabled/webapp.conf 300 | RUN mkdir /home/app/webapp 301 | RUN ...commands to place your web app in /home/app/webapp... 302 | # This copies your web app with the correct ownership. 303 | # COPY --chown=app:app /local/path/of/your/app /home/app/webapp 304 | ``` 305 | 306 | 307 | #### Configuring Nginx 308 | 309 | The best way to configure Nginx is by adding .conf files to `/etc/nginx/main.d` and `/etc/nginx/conf.d`. Files in `main.d` are included into the Nginx configuration's main context, while files in `conf.d` are included in the Nginx configuration's http context. 310 | 311 | For example: 312 | 313 | # /etc/nginx/main.d/secret_key.conf: 314 | env SECRET_KEY=123456; 315 | 316 | # /etc/nginx/conf.d/gzip_max.conf: 317 | gzip_comp_level 9; 318 | 319 | # Dockerfile: 320 | ADD secret_key.conf /etc/nginx/main.d/secret_key.conf 321 | ADD gzip_max.conf /etc/nginx/conf.d/gzip_max.conf 322 | 323 | 324 | #### Setting environment variables in Nginx 325 | 326 | By default Nginx [clears all environment variables](http://nginx.org/en/docs/ngx_core_module.html#env) (except `TZ`) for its child processes (Passenger being one of them). That's why any environment variables you set with `docker run -e`, Docker linking and `/etc/container_environment`, won't reach Nginx. 327 | 328 | To preserve these variables, place an Nginx config file ending with `*.conf` in the directory `/etc/nginx/main.d`, in which you tell Nginx to preserve these variables. For example when linking a PostgreSQL container or MongoDB container: 329 | 330 | # /etc/nginx/main.d/postgres-env.conf: 331 | env POSTGRES_PORT_5432_TCP_ADDR; 332 | env POSTGRES_PORT_5432_TCP_PORT; 333 | 334 | # Dockerfile: 335 | ADD postgres-env.conf /etc/nginx/main.d/postgres-env.conf 336 | 337 | By default, passenger-docker already contains a config file `/etc/nginx/main.d/default.conf` which preserves the `PATH` environment variable. 338 | 339 | 340 | #### Application environment name (`RAILS_ENV`, `NODE_ENV`, etc) 341 | 342 | Some web frameworks adjust their behavior according to the value some environment variables. For example, Rails respects `RAILS_ENV` while Connect.js respects `NODE_ENV`. By default, Phusion Passenger sets all of the following environment variables to the value **production**: 343 | 344 | * `RAILS_ENV` 345 | * `RACK_ENV` 346 | * `WSGI_ENV` 347 | * `NODE_ENV` 348 | * `PASSENGER_APP_ENV` 349 | 350 | Setting these environment variables yourself (e.g. using `docker run -e RAILS_ENV=...`) will not have any effect, because Phusion Passenger overrides all of these environment variables. The only exception is `PASSENGER_APP_ENV` (see below). 351 | 352 | With passenger-docker, there are two ways to set the aforementioned environment variables. The first is through the [`passenger_app_env`](https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_app_env) config option in Nginx. For example: 353 | 354 | ```nginx 355 | # /etc/nginx/sites-enabled/webapp.conf: 356 | server { 357 | ... 358 | # Ensures that RAILS_ENV, NODE_ENV, etc are set to "staging" 359 | # when your application is started. 360 | passenger_app_env staging; 361 | } 362 | ``` 363 | 364 | The second way is by setting the `PASSENGER_APP_ENV` environment variable from `docker run` 365 | 366 | docker run -e PASSENGER_APP_ENV=staging YOUR_IMAGE 367 | 368 | This works because passenger-docker autogenerates an Nginx configuration file (`/etc/nginx/conf.d/00_app_env.conf`) during container boot. This file sets the `passenger_app_env` option in the `http` context. This means that if you already set `passenger_app_env` in the `server` context, running `docker run -e PASSENGER_APP_ENV=...` won't have any effect! 369 | 370 | If you want to set a default value while still allowing that to be overridden by `docker run -e PASSENGER_APP_ENV=`, then instead of specifying `passenger_app_env` in your Nginx config file, you should create a `/etc/nginx/conf.d/00_app_env.conf`. This file will be overwritten if the user runs `docker run -e PASSENGER_APP_ENV=...`. 371 | 372 | ```nginx 373 | # /etc/nginx/conf.d/00_app_env.conf 374 | # File will be overwritten if user runs the container with `-e PASSENGER_APP_ENV=...`! 375 | passenger_app_env staging; 376 | ``` 377 | 378 | 379 | ### Using Redis 380 | 381 | **Redis is only available in the passenger-customizable and passenger-full images!** 382 | 383 | Install and enable Redis: 384 | 385 | ```dockerfile 386 | # Opt-in for Redis if you're using the 'customizable' image. 387 | #RUN /pd_build/redis.sh 388 | 389 | # Enable the Redis service. 390 | RUN rm -f /etc/service/redis/down 391 | ``` 392 | 393 | The configuration file is in /etc/redis/redis.conf. Modify it as you see fit, but make sure `daemonize no` is set. 394 | 395 | 396 | ### Using memcached 397 | 398 | **Memcached is only available in the passenger-customizable and passenger-full images!** 399 | 400 | Install and enable memcached: 401 | 402 | ```dockerfile 403 | # Opt-in for Memcached if you're using the 'customizable' image. 404 | #RUN /pd_build/memcached.sh 405 | 406 | # Enable the memcached service. 407 | RUN rm -f /etc/service/memcached/down 408 | ``` 409 | 410 | The configuration file is in /etc/memcached.conf. Note that it does not follow the Debian/Ubuntu format, but our own, in order to make it work well with runit. The default contents are: 411 | 412 | 413 | # These arguments are passed to the memcached daemon. 414 | MEMCACHED_OPTS="-l 127.0.0.1" 415 | 416 | 417 | 418 | ### Additional daemons 419 | 420 | You can add additional daemons to the image by creating runit entries. You only have to write a small shell script which runs your daemon, and runit will keep it up and running for you, restarting it when it crashes, etc. 421 | 422 | The shell script must be called `run`, must be executable, and is to be placed in the directory `/etc/service/`. 423 | 424 | Here's an example showing you how to a memached server runit entry can be made. 425 | 426 | ### In memcached.sh (make sure this file is chmod +x): 427 | #!/bin/sh 428 | # `setuser` is part of baseimage-docker. `setuser mecached xxx...` runs the given command 429 | # (`xxx...`) as the user `memcache`. If you omit this, the command will be run as root. 430 | exec /sbin/setuser memcache /usr/bin/memcached >>/var/log/memcached.log 2>&1 431 | 432 | ### In Dockerfile: 433 | RUN mkdir /etc/service/memcached 434 | ADD memcached.sh /etc/service/memcached/run 435 | 436 | Note that the shell script must run the daemon **without letting it daemonize/fork it**. Usually, daemons provide a command line flag or a config file option for that. 437 | 438 | **Tip**: If you're thinking about running your web app, consider deploying it on Passenger instead of on runit. Passenger relieves you from even having to write a shell script, and adds all sorts of useful production features like process scaling, introspection, etc. These are not available when you're only using runit. 439 | 440 | 441 | ### Using Ruby 442 | 443 | We use [RVM](https://rvm.io/) to install and to manage Ruby interpreters. Because of this there are some special considerations you need to know, particularly when you are using the `passenger-full` image which contains multiple Ruby versions installed in parallel. You can learn more about RVM at the RVM website, but this section will teach you its basic usage. 444 | 445 | 446 | #### Selecting a default Ruby version 447 | 448 | The default Ruby (what the `/usr/bin/ruby` command executes) is the latest Ruby version that you've chosen to install. You can use RVM select a different version as default. 449 | 450 | ```dockerfile 451 | # Ruby 3.2.8 452 | RUN bash -lc 'rvm --default use ruby-3.2.8' 453 | # Ruby 3.3.8 454 | RUN bash -lc 'rvm --default use ruby-3.3.8' 455 | # Ruby 3.4.4 456 | RUN bash -lc 'rvm --default use ruby-3.4.4' 457 | # JRuby 9.3.15.0 458 | RUN bash -lc 'rvm --default use jruby-9.3.15.0' 459 | # JRuby 9.4.9.0 460 | RUN bash -lc 'rvm --default use jruby-9.4.9.0' 461 | ``` 462 | 463 | Learn more: [RVM: Setting the default Ruby](https://rvm.io/rubies/default). 464 | 465 | 466 | #### Running a command with a specific Ruby version 467 | 468 | You can run any command with a specific Ruby version by prefixing it with `rvm-exec `. For example: 469 | 470 | ```bash 471 | $ rvm-exec 3.3.8 ruby -v 472 | Using /usr/local/rvm/gems/ruby-3.3.8 473 | ruby 3.3.8 (2025-04-09 revision b200bad6cd) [x86_64-linux] 474 | 475 | $ rvm-exec 3.4.4 ruby -v 476 | Using /usr/local/rvm/gems/ruby-3.4.4 477 | ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x86_64-linux] 478 | 479 | ``` 480 | 481 | More examples, but with Bundler instead: 482 | 483 | ```bash 484 | # This runs 'bundle install' using Ruby 3.4.4 485 | rvm-exec 3.4.4 bundle install 486 | ``` 487 | 488 | 489 | #### Default wrapper scripts 490 | 491 | Rubies are installed by RVM to /usr/local/rvm. Interactive and login Bash shells load the RVM environment, which ensures that the appropriate directories under /usr/local/rvm are in PATH. 492 | 493 | But this means that if you invoke a command without going through an interactive and login Bash shell (e.g. directly using `docker exec`) then the RVM environment won't be loaded. In order to make Ruby work even in this case, Passenger-docker includes a bunch of wrapper scripts: 494 | 495 | * /usr/bin/ruby 496 | * /usr/bin/rake 497 | * /usr/bin/gem 498 | * /usr/bin/bundle 499 | 500 | These wrapper scripts execute the respective command through `rvm-exec` using the default Ruby interpreter. 501 | 502 | 503 | ### Running scripts during container startup 504 | 505 | passenger-docker uses the [baseimage-docker](http://phusion.github.io/baseimage-docker/) init system, `/sbin/my_init`. This init system runs the following scripts during startup, in the following order: 506 | 507 | * All executable scripts in `/etc/my_init.d`, if this directory exists. The scripts are run during in lexicographic order. 508 | * The script `/etc/rc.local`, if this file exists. 509 | 510 | All scripts must exit correctly, e.g. with exit code 0. If any script exits with a non-zero exit code, the booting will fail. 511 | 512 | The following example shows how you can add a startup script. This script simply logs the time of boot to the file /tmp/boottime.txt. 513 | 514 | ### In logtime.sh (make sure this file is chmod +x): 515 | #!/bin/sh 516 | date > /tmp/boottime.txt 517 | 518 | ### In Dockerfile: 519 | RUN mkdir -p /etc/my_init.d 520 | ADD logtime.sh /etc/my_init.d/logtime.sh 521 | 522 | 523 | ### Upgrading the operating system inside the container 524 | 525 | passenger-docker images contain an Ubuntu 24.04 operating system. You may want to update this OS from time to time, for example to pull in the latest security updates. OpenSSL is a notorious example. Vulnerabilities are discovered in OpenSSL on a regular basis, so you should keep OpenSSL up-to-date as much as you can. 526 | 527 | While we release passenger-docker images with the latest OS updates from time to time, you do not have to rely on us. You can update the OS inside passenger-docker images yourself, and it is recommend that you do this instead of waiting for us. This is also especially important to upgrade any installed Python or Node packages to the latest minor version. 528 | 529 | To upgrade the OS in the image, run this in your Dockerfile: 530 | 531 | RUN apt-get update && apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade 532 | 533 | 534 | ### Upgrading Passenger to the latest version 535 | 536 | #### Upgrading to the latest image 537 | 538 | Passenger-docker images contain a specific Passenger version by default. We regularly update passenger-docker with the latest version of Passenger, Ruby, Node.js, etc. 539 | 540 | To upgrade your image to the latest passenger-docker version, please edit your Dockerfile and change the passenger-docker version in the `FROM` command to the latest version. You can find a list of available versions in the [Changelog](https://github.com/phusion/passenger-docker/blob/master/CHANGELOG.md). 541 | 542 | For example, if you were using passenger-docker 0.9.16 and want to upgrade to 0.9.17, then change... 543 | 544 | ```dockerfile 545 | FROM phusion/passenger-docker-XXXX:0.9.16 546 | ``` 547 | 548 | ...to: 549 | 550 | ```dockerfile 551 | FROM phusion/passenger-docker-XXXX:0.9.17 552 | ``` 553 | 554 | Then rebuild your image. 555 | 556 | #### Upgrading Passenger without waiting for image updates 557 | 558 | We do not update the passenger-docker image on *every* Passenger release. Having said that, you can upgrade Passenger at any time, without waiting for us to release a new image. 559 | 560 | Passenger is installed through [the Passenger APT repository](https://www.phusionpassenger.com/library/install/nginx/apt_repo/), so you can use APT to upgrade Passenger. 561 | 562 | To upgrade to the latest Passenger version, run this to your Dockerfile: 563 | 564 | ```dockerfile 565 | RUN apt-get update && apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade 566 | ``` 567 | 568 | 569 | ## Container administration 570 | 571 | One of the ideas behind Docker is that containers should be stateless, easily restartable, and behave like a black box. However, you may occasionally encounter situations where you want to login to a container, or to run a command inside a container, for development, inspection and debugging purposes. This section describes how you can administer the container for those purposes. 572 | 573 | _**Tip**: passenger-docker is based on [baseimage-docker](https://github.com/phusion/baseimage-docker). Please consult [the baseimage-docker documentation](https://github.com/phusion/baseimage-docker) for more container administration documentation and tips._ 574 | 575 | 576 | ### Running a one-shot command in a new container 577 | 578 | _**Note:** This section describes how to run a command insider a -new- container. To run a command inside an existing running container, see [Running a command in an existing, running container](#run_inside_existing_container)._ 579 | 580 | Normally, when you want to create a new container in order to run a single command inside it, and immediately exit after the command exits, you invoke Docker like this: 581 | 582 | docker run YOUR_IMAGE COMMAND ARGUMENTS... 583 | 584 | However the downside of this approach is that the init system is not started. That is, while invoking `COMMAND`, important daemons such as cron and syslog are not running. Also, orphaned child processes are not properly reaped, because `COMMAND` is PID 1. 585 | 586 | Passenger-docker provides a facility to run a single one-shot command, while solving all of the aforementioned problems. Run a single command in the following manner: 587 | 588 | docker run YOUR_IMAGE /sbin/my_init -- COMMAND ARGUMENTS ... 589 | 590 | This will perform the following: 591 | 592 | * Runs all system startup files, such as /etc/my_init.d/* and /etc/rc.local. 593 | * Starts all runit services. 594 | * Runs the specified command. 595 | * When the specified command exits, stops all runit services. 596 | 597 | For example: 598 | 599 | $ docker run phusion/passenger-full: /sbin/my_init -- ls 600 | *** Running /etc/rc.local... 601 | *** Booting runit daemon... 602 | *** Runit started as PID 80 603 | *** Running ls... 604 | bin boot dev etc home image lib lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var 605 | *** ls exited with exit code 0. 606 | *** Shutting down runit daemon (PID 80)... 607 | *** Killing all processes... 608 | 609 | You may find that the default invocation is too noisy. Or perhaps you don't want to run the startup files. You can customize all this by passing arguments to `my_init`. Invoke `docker run YOUR_IMAGE /sbin/my_init --help` for more information. 610 | 611 | The following example runs `ls` without running the startup files and with less messages, while running all runit services: 612 | 613 | $ docker run phusion/passenger-full: /sbin/my_init --skip-startup-files --quiet -- ls 614 | bin boot dev etc home image lib lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var 615 | 616 | 617 | ### Running a command in an existing, running container 618 | 619 | There are two ways to run a command inside an existing, running container. 620 | 621 | * Through the `docker exec` tool. This is builtin Docker tool, available since Docker 1.4. Internally, it uses Linux kernel system calls in order to execute a command within the context of a container. Learn more in [Login to the container, or running a command inside it, via `docker exec`](#login_docker_exec). 622 | * Through SSH. This approach requires running an SSH daemon inside the container, and requires you to setup SSH keys. Learn more in [Login to the container, or running a command inside it, via SSH](#login_ssh). 623 | 624 | Both way have their own pros and cons, which you can learn in their respective subsections. 625 | 626 | 627 | ### Login to the container, or running a command inside it, via `docker exec` 628 | 629 | You can use the `docker exec` tool on the Docker host OS to login to any container that is based on passenger-docker. You can also use it to run a command inside a running container. `docker exec` works by using Linux kernel system calls. 630 | 631 | Here's how it compares to [using SSH to login to the container or to run a command inside it](#login_ssh): 632 | 633 | * Pros 634 | * Does not require running an SSH daemon inside the container. 635 | * Does not require setting up SSH keys. 636 | * Works on any container, even containers not based on passenger-docker. 637 | * Cons 638 | * If the `docker exec` process on the host is terminated by a signal (e.g. with the `kill` command or even with Ctrl-C), then the command that is executed by `docker exec` is *not* killed and cleaned up. You will either have to do that manually, or you have to run `docker exec` with `-t -i`. 639 | * Requires privileges on the Docker host to be able to access the Docker daemon. Note that anybody who can access the Docker daemon effectively has root access. 640 | * Not possible to allow users to login to the container without also letting them login to the Docker host. 641 | 642 | 643 | #### Usage 644 | 645 | Start a container: 646 | 647 | docker run YOUR_IMAGE 648 | 649 | Find out the ID of the container that you just ran: 650 | 651 | docker ps 652 | 653 | Now that you have the ID, you can use `docker exec` to run arbitrary commands in the container. For example, to run `echo hello world`: 654 | 655 | docker exec YOUR-CONTAINER-ID echo hello world 656 | 657 | To open a bash session inside the container, you must pass `-t -i` so that a terminal is available: 658 | 659 | docker exec -t -i YOUR-CONTAINER-ID bash -l 660 | 661 | 662 | ### Login to the container, or running a command inside it, via SSH 663 | 664 | You can use SSH to login to any container that is based on passenger-docker. You can also use it to run a command inside a running container. 665 | 666 | Here's how it compares to [using `docker exec` to login to the container or to run a command inside it](#login_docker_exec): 667 | 668 | * Pros 669 | * Does not require root privileges on the Docker host. 670 | * Allows you to let users login to the container, without letting them login to the Docker host. However, this is not enabled by default because passenger-docker does not expose the SSH server to the public Internet by default. 671 | * Cons 672 | * Requires setting up SSH keys. However, passenger-docker makes this easy for many cases through a pregenerated, insecure key. Read on to learn more. 673 | 674 | 675 | #### Enabling SSH 676 | 677 | Passenger-docker disables the SSH server by default. Add the following to your Dockerfile to enable it: 678 | 679 | ```dockerfile 680 | RUN rm -f /etc/service/sshd/down 681 | 682 | # Regenerate SSH host keys. Passenger-docker does not contain any, so you 683 | # have to do that yourself. You may also comment out this instruction; the 684 | # init system will auto-generate one during boot. 685 | RUN /etc/my_init.d/00_regen_ssh_host_keys.sh 686 | ``` 687 | 688 | 689 | #### About SSH keys 690 | 691 | First, you must ensure that you have the right SSH keys installed inside the container. By default, no keys are installed, so nobody can login. For convenience reasons, we provide [a pregenerated, insecure key](https://raw.githubusercontent.com/phusion/baseimage-docker/master/image/services/sshd/keys/insecure_key) [(PuTTY format)](https://raw.githubusercontent.com/phusion/baseimage-docker/master/image/services/sshd/keys/insecure_key.ppk) that you can easily enable. However, please be aware that using this key is for convenience only. It does not provide any security because this key (both the public and the private side) is publicly available. **In production environments, you should use your own keys**. 692 | 693 | 694 | #### Using the insecure key for one container only 695 | 696 | You can temporarily enable the insecure key for one container only. This means that the insecure key is installed at container boot. If you `docker stop` and `docker start` the container, the insecure key will still be there, but if you use `docker run` to start a new container then that container will not contain the insecure key. 697 | 698 | Start a container with `--enable-insecure-key`: 699 | 700 | docker run YOUR_IMAGE /sbin/my_init --enable-insecure-key 701 | 702 | Find out the ID of the container that you just ran: 703 | 704 | docker ps 705 | 706 | Once you have the ID, look for its IP address with: 707 | 708 | docker inspect -f "{{ .NetworkSettings.IPAddress }}" 709 | 710 | Now that you have the IP address, you can use SSH to login to the container, or to execute a command inside it: 711 | 712 | ```bash 713 | # Download the insecure private key 714 | curl -o insecure_key -fSL https://raw.githubusercontent.com/phusion/baseimage-docker/master/image/services/sshd/keys/insecure_key 715 | chmod 600 insecure_key 716 | 717 | # Login to the container 718 | ssh -i insecure_key root@ 719 | 720 | # Running a command inside the container 721 | ssh -i insecure_key root@ echo hello world 722 | ``` 723 | 724 | 725 | #### Enabling the insecure key permanently 726 | 727 | It is also possible to enable the insecure key in the image permanently. This is not generally recommended, but is suitable for e.g. temporary development or demo environments where security does not matter. 728 | 729 | Edit your Dockerfile to install the insecure key permanently: 730 | 731 | ```dockerfile 732 | RUN /usr/sbin/enable_insecure_key 733 | ``` 734 | 735 | Instructions for logging in the container is the same as in section [Using the insecure key for one container only](#using_the_insecure_key_for_one_container_only). 736 | 737 | 738 | #### Using your own key 739 | 740 | Edit your Dockerfile to install an SSH public key: 741 | 742 | ```dockerfile 743 | ## Install an SSH of your choice. 744 | ADD your_key.pub /tmp/your_key.pub 745 | RUN cat /tmp/your_key.pub >> /root/.ssh/authorized_keys && rm -f /tmp/your_key.pub 746 | ``` 747 | 748 | Then rebuild your image. Once you have that, start a container based on that image: 749 | 750 | docker run your-image-name 751 | 752 | Find out the ID of the container that you just ran: 753 | 754 | docker ps 755 | 756 | Once you have the ID, look for its IP address with: 757 | 758 | docker inspect -f "{{ .NetworkSettings.IPAddress }}" 759 | 760 | Now that you have the IP address, you can use SSH to login to the container, or to execute a command inside it: 761 | 762 | ```bash 763 | # Login to the container 764 | ssh -i /path-to/your_key root@ 765 | 766 | # Running a command inside the container 767 | ssh -i /path-to/your_key root@ echo hello world 768 | ``` 769 | 770 | 771 | #### The `docker-ssh` tool 772 | 773 | Looking up the IP of a container and running an SSH command quickly becomes tedious. Luckily, we provide the `docker-ssh` tool which automates this process. This tool is to be run on the *Docker host*, not inside a Docker container. 774 | 775 | First, install the tool on the Docker host: 776 | 777 | ```bash 778 | curl --fail -L -O https://github.com/phusion/baseimage-docker/archive/master.tar.gz && \ 779 | tar xzf master.tar.gz && \ 780 | sudo ./baseimage-docker-master/install-tools.sh 781 | ``` 782 | 783 | Then run the tool as follows to login to a container using SSH: 784 | 785 | docker-ssh YOUR-CONTAINER-ID 786 | 787 | You can lookup `YOUR-CONTAINER-ID` by running `docker ps`. 788 | 789 | By default, `docker-ssh` will open a Bash session. You can also tell it to run a command, and then exit: 790 | 791 | docker-ssh YOUR-CONTAINER-ID echo hello world 792 | 793 | 794 | ### Inspecting the status of your web app 795 | 796 | If you use Passenger to deploy your web app, run: 797 | 798 | passenger-status 799 | passenger-memory-stats 800 | 801 | 802 | ### Logs 803 | 804 | If anything goes wrong, consult the log files in /var/log. The following log files are especially important: 805 | 806 | * /var/log/nginx/error.log 807 | * /var/log/syslog 808 | * Your app's log file in /home/app. 809 | 810 | 811 | ### Switching to Phusion Passenger Enterprise 812 | 813 | If you are a [Phusion Passenger Enterprise](https://www.phusionpassenger.com/enterprise) customer, then you can switch to the Enterprise variant as follows. 814 | 815 | 1. Login to the [Customer Area](https://www.phusionpassenger.com/orders). 816 | 2. Download the license key and store it in the same directory as your Dockerfile. 817 | 3. Insert into your Dockerfile: 818 | 819 | ```dockerfile 820 | ADD passenger-enterprise-license /etc/passenger-enterprise-license 821 | RUN echo deb https://download:$DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt $(lsb_release -cs) main > /etc/apt/sources.list.d/passenger.list 822 | RUN apt-get update && apt-get install -y -o Dpkg::Options::="--force-confold" libnginx-mod-http-passenger-enterprise 823 | ``` 824 | 825 | Replace `$DOWNLOAD_TOKEN` with your actual download token, as found in the Customer Area. 826 | 827 | 828 | ## Building the image yourself 829 | 830 | If for whatever reason you want to build the image yourself instead of downloading it from the Docker registry, follow these instructions. 831 | 832 | Clone this repository: 833 | 834 | git clone https://github.com/phusion/passenger-docker.git 835 | cd passenger-docker 836 | 837 | Start a virtual machine with Docker in it. You can use the Vagrantfile that we've already provided. 838 | 839 | vagrant up 840 | vagrant ssh 841 | cd /vagrant 842 | 843 | Build one of the images: 844 | 845 | make build_ruby31 846 | make build_ruby32 847 | make build_ruby33 848 | make build_ruby34 849 | make build_python39 850 | make build_python310 851 | make build_python311 852 | make build_python312 853 | make build_python313 854 | make build_jruby93 855 | make build_jruby94 856 | make build_nodejs 857 | make build_customizable 858 | make build_full 859 | 860 | If you want to call the resulting image something else, pass the NAME variable, like this: 861 | 862 | NAME=joe/passenger make build_ruby32 863 | 864 | Make will build images for both AMD64 and ARM64 by default. If you only want to build for one CPU architecture (ie. AMD64), disable the other architecture like this: 865 | 866 | BUILD_ARM64=0 make build_ruby32 867 | 868 | 869 | ## FAQ 870 | 871 | 872 | #### Why are you using RVM? Why not rbenv or chruby? 873 | 874 | In summary: 875 | 876 | * We have found RVM to be much more user friendly than rbenv and chruby. 877 | * RVM supplies precompiled binaries, while rbenv and chruby only support compiling Ruby from source. 878 | * Installing Ruby from Brightbox's APT repository caused too many problems. We used Brightbox's APT repository in the past, but we concluded that it is not the way to go forward. 879 | 880 | Rbenv and chruby's main value proposition is that they are "simple". Indeed, they are simpler in implementation (fewer lines of code) than RVM, but they are not simpler to use. Rbenv and chruby are built on the Unix "do one thing only" philosophy. While this is sound, it is not necessarily the behavior that users want: I have seen many users struggling with basic rbenv/chruby usage because of lack of understanding of environment variables, or not having installed the right dependencies. Many users do not understand how the system is supposed to function and what all the different parts are, so doing one thing only may not be what they need. In such a case the simplicity ends up being more of a liability than an asset. It's like selling a car engine, frame and interior separately, while most consumers want an entire car. 881 | 882 | RVM is built around a more "holistic" philosophy, if you will. It tries harder to be friendly to users who may not necessarily understand how everything works, for example, by automatically installing a bash profile entry and necessary dependencies. 883 | 884 | Another critique of RVM is that it is complicated and causes problems. This has not been our experience: perhaps this was the case in the past, but we have found RVM to be quite stable. 885 | 886 | #### Why don't you just install Ruby manually from source? 887 | 888 | By installing Ruby manually from source, we are just reinventing some of the functionality provided by a real Ruby version manager such as RVM, so we may as well use one to save ourselves time. There is no reason not to use RVM: it only occupies 5 MB of space. 889 | 890 | #### Why are you not using the Brightbox's APT repository? 891 | 892 | The Brightbox APT repository contains packages for multiple Ruby versions, which can be installed side-by-side. At first, this seems like the perfect solution. And indeed, passenger-docker used to use the Brightbox APT repository. 893 | 894 | Unfortunately, we have found that it is much harder to make the different Rubies play nice with each other than it should be. Despite being installable side-to-side, they still conflict with each other. The most notable problem is that all Rubies' RubyGems install binwrappers to /usr/local/bin, but binwrappers generated by different Ruby versions may not be compatible with each other. 895 | 896 | RVM provides much better isolation between different Ruby versions. 897 | 898 | #### Why don't you just install Ruby from Ubuntu's APT repository? 899 | 900 | Because we need to support Ruby versions not available from Ubuntu's APT repository. Besides, Ubuntu (and Debian) are notorious for being slow with updating Ruby packages. By the time the next Ruby version is released, we will have to wait until the next Ubuntu LTS version before we can use it. 901 | 902 | 903 | ## Contributing 904 | 905 | Thanks for your interest in contributing! There are many ways to contribute to this project. Get started [here](https://github.com/phusion/passenger-docker/blob/master/CONTRIBUTING.md). 906 | 907 | 908 | ## Conclusion 909 | 910 | * Using passenger-docker? [Tweet about us](https://twitter.com/share) or [follow us on Twitter](https://twitter.com/phusion_nl). 911 | * Having problems? Please post a message at [the discussion forum](https://groups.google.com/d/forum/passenger-docker). 912 | * Looking for a minimal image containing only a correct base system? Take a look at [baseimage-docker](https://github.com/phusion/baseimage-docker). 913 | * Need a helping hand? Phusion also offers [consulting](https://www.phusion.nl/consultancy) on a wide range of topics, including Web Development, UI/UX Research & Design, Technology Migration and Auditing. 914 | 915 | 916 | [](http://www.phusion.nl/) 917 | 918 | Please enjoy passenger-docker, a product by [Phusion](http://www.phusion.nl/). :-) 919 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | ROOT = File.dirname(File.expand_path(__FILE__)) 4 | 5 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 6 | VAGRANTFILE_API_VERSION = '2' 7 | 8 | # Default env properties which can be overridden 9 | # Example overrides: 10 | # echo "ENV['BASEIMAGE_PATH'] ||= '../../phusion/baseimage-docker' " >> ~/.vagrant.d/Vagrantfile 11 | # echo "ENV['BASE_BOX_URL'] ||= 'd\:/dev/vm/vagrant/boxes/phusion/'" >> ~/.vagrant.d/Vagrantfile 12 | BASE_BOX_URL = ENV['BASE_BOX_URL'] || 'https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/' 13 | VAGRANT_BOX_URL = ENV['VAGRANT_BOX_URL'] || BASE_BOX_URL + 'ubuntu-14.04-amd64-vbox.box' 14 | VMWARE_BOX_URL = ENV['VMWARE_BOX_URL'] || BASE_BOX_URL + 'ubuntu-14.04-amd64-vmwarefusion.box' 15 | PASSENGER_DOCKER_PATH = ENV['PASSENGER_DOCKER_PATH'] || '.' 16 | BASEIMAGE_PATH = ENV['BASEIMAGE_PATH'] || '../baseimage-docker' 17 | DOCKERIZER_PATH = ENV['DOCKERIZER_PATH'] || '../dockerizer' 18 | 19 | $script = <