Commit Graph

28 Commits

Author SHA1 Message Date
Jeff Wong cc9c36e59d
FEATURE: introduce web_only images
web_only images do not install postgres or redis, minimizing image sizes for
setups that do not require those components.

release and dev images still install postgres and redis, but do it later in the
process.

remove rm runs

rm no longer affects image sizes as we are no longer squashing images
2025-05-18 09:46:39 -07:00
Alan Guo Xiang Tan ab957b2f64
Build images with PG 15 installed (#917)
This commit updates the build workflow to build and push an extra base Docker
image with PG 15 installed. The tag is not meant to be permanent and is
just meant to help us update our postgres templates to support PG 15
within the same commit.

The tag will be removed once our `discourse/base:release` ships with PG
15 by default.
2025-01-21 09:59:32 +08:00
Alan Guo Xiang Tan 136c638906
DEV: Remove invalid comment (#916)
This script is used by the build workflow which invalidates the comment
2025-01-16 08:48:16 +08:00
Alan Guo Xiang Tan b47bd562cc
Release `discourse/base` images for `discourse/discourse` stable branch (#864)
This commit updates our `build` workflow to push the following manifests
which can be used to run Discourse against the stable branch.

1. discourse/base:2.0.$TIMESTAMP-stable
2. discourse/base:release-stable

Co-authored-by: David Taylor <david@taylorhq.com>
2024-09-09 19:49:14 +08:00
Alan Guo Xiang Tan fe48fa2c5c
Switch to `discourse/ruby:3.3.4-bookworm-slim` (#853) 2024-09-02 11:49:43 +08:00
David Taylor fc61b8a850
DEV: Introduce arm64 dev image and multi-arch manifests (#829)
- Combines dev image build into the `base` job
- Calculates a single timestamp for all builds
- Pushes timestamped per-arch images to Dockerhub for base, base-slim and dev images
- If both arch build jobs are successful, multiarch manifests are generated & pushed
2024-08-26 13:10:28 +08:00
Alan Guo Xiang Tan 4c58e2b75b
Switch to debian:bookworm-slim image (#831)
Debian Bullseye is EOL.
2024-08-22 10:57:56 +08:00
Alan Guo Xiang Tan 21a0351e30
Build `discourse/base` and `discourse/discourse_test` image for bookworm (#823)
We need to upgrade to bookworm because bullseye is EOL. This commit when merged into branch will push the following images to Docker hub:

1. `discourse/base:slim-bookworm`
2. `discourse/base:release-bookworm`
3. `discourse/discourse_test:slim-bookworm`
4. `discourse/discourse_test:slim-browsers-bookworm`
5. `discourse/discourse_test:release-bookworm`
2024-08-08 16:29:53 +08:00
Alan Guo Xiang Tan 6c890061e7
DEV: Build/release `discourse/base:release-ruby-3.3.1` for testing (#800)
This commit adds a `ruby_3_3` job to our Github workflow which releases
a `discourse/base:release-ruby-3.3.1` Docker image to allow us to test
Ruby 3.3.1 before eventually changing to that version as the default.
2024-05-07 13:29:45 +08:00
Alan Guo Xiang Tan 4bece5f47e
Refactor Github action build workflow to build for both arm64/amd64 (#781)
Why this change?

Now that we can efficiently build Docker images targeted at `linux/arm64`,
we will start to release images for `linux/arm64` in the same way we do
for `linux/amd64` images.

Images released for `linux/amd64` are tagged as follows:

1. discourse/base:2.0.\<datetime\>-slim
2. discourse/base:slim
3. discourse/base:2.0.\<datetime\>
4. discourse/base:release

For `linux/arm64`, the images are tagged as follows:

1. discourse/base:2.0.\<datetime\>-slim-arm64
2. discourse/base:slim-arm64
3. discourse/base:2.0.\<datetime\>-arm64
4. discourse/base:release-arm64
5. discourse/base:aarch64 (For backwards compatibility)

For `linux/arm64`, we unfortunately cannot install chrome because chrome
does not currently release binaries for the arch. Therefore, we install
chromium which chrome is based off and also install the chromedriver
binary for `linux/arm64` released by the electron project.
2024-03-20 06:26:36 +08:00
Alan Guo Xiang Tan bbefa1e5f3
Use Github hosted ARM runners to build arm64/aarch64 release image (#779)
Why this change?

We have been given access to Github's private beta of ARM hosted
runners. Switching to ARM runners should drastically speed up the time
required for us to build our ARM image.

What does this change do?

1. Switch to use Github's ARM hosted runners.
2. Build release image for arm64 as well. We previously only built the
   slim image because building the release image through emulation is
   way too slow so we skipped the release image.
3. Update `bundle` in `release.Dockerfile` to install gems in parallel
   based on the number of cores instead of hardcoding it to 4 jobs.
2024-03-19 10:29:56 +08:00
Loïc Guitaut 1964d1737a FEATURE: Add early support for aarch64 in dev env
This patch adds some new steps to support the aarch64 architecture
on Linux.

An updated version of Rust is needed to compile the `selenium-manager`
binary as it’s not shipped with the `selenium-webdriver` gem yet.
In the same vein, Google doesn’t ship an aarch64 version of Chrome yet,
so it doesn’t make sense to install even Chromium in the image. We have
to rely on Firefox to run the system specs.
2024-01-30 10:23:57 +01:00
Alan Guo Xiang Tan 0c93b2207d
DEV: Remove use of `--squash` flag and switch to buildx (#743)
Why this change?

In CI, we are seeing the following warning message:

```
WARNING: experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency.
```

Basically, the `--squash` flag has not been working for quite some time
and is redundant.

What does this change do?

* This change removes the use of the `--squash` flag.

* This change uses the `buildx` tool in `auto_build.rb` as we prepare to
  build images for multiple platforms.
2023-10-16 10:41:05 +08:00
Leonardo Mosquera 1d5c31719a
Correct parameter naming for PTY.spawn (#678)
Per the docs, first parameter for the block is STDOUT + STDERR, 2nd one is STDIN:
https://ruby-doc.org/3.1.3/exts/pty/PTY.html#method-c-spawn

As it is now, the method looks like it's reading from STDIN, though in
fact it's reading from an incorrectly named parameter for STDOUT.
2023-02-13 20:19:47 -03:00
Jarek Radosz 0ea4ee497f
DEV: Add usage info to auto_build script (#626) 2022-04-29 14:19:37 +02:00
David Taylor 1b2c026c2a
DEV: Provide slim versions of the discourse_test image (#586)
Also moves the discourse_test image to use a multi-stage build
2021-12-14 14:53:20 +00:00
David Taylor 3ef754f4ca
Introduce a discourse/base:slim image (#588)
The base-slim image doesn't run `yarn install` or `bundle install`, so it is much more lightweight. This is intended for use by systems which do their own dependency caching (e.g. GitHub Actions)

The image will be released under the `:slim` tag, and also `:v2.0.{timestamp}-slim`
2021-12-13 21:03:00 +00:00
Rafael dos Santos Silva d0bb6d7e2f move aarch64 build to CI 2021-12-02 17:19:43 -03:00
Rafael dos Santos Silva 2ff713ba3a try building an image for aarch64 2021-12-02 17:19:43 -03:00
David Taylor 03d5606521
Update GitHub actions configuration (#548)
- Only attempt dockerhub push if previous steps are successful
- Make auto_build.rb exit with non-zero status if build fails
- enable experimental features (--squash) for dev image build
2021-06-18 12:55:06 +01:00
Guo Xiang Tan 5abadddf9c Bump `discourse/discourse_test:release` before `discourse/discourse_dev`. 2017-12-19 15:21:42 +08:00
Guo Xiang Tan df7ccdb902 Remove phantomjs and install google-chrome-stable into test base image. 2017-12-19 13:10:03 +08:00
Rafael dos Santos Silva 38cff91908 FEATURE: Build a public test image every week 2017-06-21 23:45:19 -03:00
Rafael dos Santos Silva 22baac2358 Enable experimental squash 2017-02-13 15:14:22 -02:00
Rafael dos Santos Silva 7e364d47b3 Make auto_build do less, and keep it simple 2017-02-07 23:48:13 -02:00
Rafael dos Santos Silva 7ead2337f8 Let's try busting the cache 2017-02-02 00:23:49 -02:00
Rafael dos Santos Silva d288199f66 More work to make automatic build easier 2017-02-01 00:41:39 -02:00
Rafael dos Santos Silva 674468764e Move everything to a complete base image 2017-01-31 13:21:00 -02:00