Skip to content

Commit

Permalink
Merge pull request #190 from buildpacks/feat/bump-ubuntu-noble
Browse files Browse the repository at this point in the history
Update to latest Ubuntu LTS
  • Loading branch information
AidanDelaney authored Oct 28, 2024
2 parents 7e3d07e + 80c8234 commit b35a928
Show file tree
Hide file tree
Showing 19 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workflows:
executor-image: ubuntu-2204:2023.04.2
working-directory: apps/java-maven
image-name: cnbs/circleci-sample
builder: 'cnbs/sample-builder:jammy'
builder: 'cnbs/sample-builder:noble'
version: '0.32.1'
- test:
requires:
Expand Down
82 changes: 41 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ clean: clean-linux clean-windows

build-linux: build-linux-bases build-linux-packages build-linux-builders build-linux-buildpacks

build-linux-bases: build-base-alpine build-base-jammy
build-linux-bases: build-base-alpine build-base-noble

build-alpine: build-base-alpine build-builder-alpine build-buildpacks-alpine

build-jammy: build-base-jammy build-builder-jammy build-buildpacks-jammy
build-noble: build-base-noble build-builder-noble build-buildpacks-noble

build-base-alpine:
@echo "> Building 'alpine' base images..."
${PACK_CMD} config experimental true
bash base-images/build.sh alpine

build-base-jammy:
@echo "> Building 'jammy' base images..."
build-base-noble:
@echo "> Building 'noble' base images..."
${PACK_CMD} config experimental true
bash base-images/build.sh jammy
bash base-images/build.sh noble

build-linux-builders: build-builder-alpine build-builder-jammy
build-linux-builders: build-builder-alpine build-builder-noble

build-builder-alpine: build-linux-packages build-sample-root
@echo "> Building 'alpine' builder..."
$(PACK_CMD) builder create cnbs/sample-builder:alpine --config $(SAMPLES_ROOT)/builders/alpine/builder.toml $(PULL_POLICY_NEVER)

build-builder-jammy: build-linux-packages build-sample-root
@echo "> Building 'jammy' builder..."
$(PACK_CMD) builder create cnbs/sample-builder:jammy --config $(SAMPLES_ROOT)/builders/jammy/builder.toml $(PULL_POLICY_NEVER)
build-builder-noble: build-linux-packages build-sample-root
@echo "> Building 'noble' builder..."
$(PACK_CMD) builder create cnbs/sample-builder:noble --config $(SAMPLES_ROOT)/builders/noble/builder.toml $(PULL_POLICY_NEVER)

build-linux-buildpacks: build-buildpacks-alpine build-buildpacks-jammy
build-linux-buildpacks: build-buildpacks-alpine build-buildpacks-noble

build-buildpacks-alpine: build-sample-root
@echo "> Starting local registry to store alpine builder (when builder contains extensions it must exist in a registry so that builds can use --pull-policy=always and we don't want to override the locally built builder)"
Expand All @@ -60,24 +60,24 @@ build-buildpacks-alpine: build-sample-root
@echo "> Creating 'kotlin-gradle' app using 'alpine' builder..."
$(PACK_CMD) build sample-kotlin-gradle-app:alpine -v --builder localhost:5000/cnbs/sample-builder:alpine --path apps/kotlin-gradle --network=host

build-buildpacks-jammy: build-sample-root
@echo "> Creating 'hello-moon' app using 'jammy' builder..."
$(PACK_CMD) build sample-hello-moon-app:jammy -v --builder cnbs/sample-builder:jammy --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world --buildpack $(SAMPLES_ROOT)/buildpacks/hello-moon $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)
build-buildpacks-noble: build-sample-root
@echo "> Creating 'hello-moon' app using 'noble' builder..."
$(PACK_CMD) build sample-hello-moon-app:noble -v --builder cnbs/sample-builder:noble --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world --buildpack $(SAMPLES_ROOT)/buildpacks/hello-moon $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

@echo "> Creating 'hello-processes' app using 'jammy' builder..."
$(PACK_CMD) build sample-hello-processes-app:jammy -v --builder cnbs/sample-builder:jammy --buildpack $(SAMPLES_ROOT)/buildpacks/hello-processes $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)
@echo "> Creating 'hello-processes' app using 'noble' builder..."
$(PACK_CMD) build sample-hello-processes-app:noble -v --builder cnbs/sample-builder:noble --buildpack $(SAMPLES_ROOT)/buildpacks/hello-processes $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

@echo "> Creating 'hello-world' app using 'jammy' builder..."
$(PACK_CMD) build sample-hello-world-app:jammy -v --builder cnbs/sample-builder:jammy --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)
@echo "> Creating 'hello-world' app using 'noble' builder..."
$(PACK_CMD) build sample-hello-world-app:noble -v --builder cnbs/sample-builder:noble --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

@echo "> Creating 'java-maven' app using 'jammy' builder..."
$(PACK_CMD) build sample-java-maven-app:jammy -v --builder cnbs/sample-builder:jammy --path apps/java-maven $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)
@echo "> Creating 'java-maven' app using 'noble' builder..."
$(PACK_CMD) build sample-java-maven-app:noble -v --builder cnbs/sample-builder:noble --path apps/java-maven $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

@echo "> Creating 'kotlin-gradle' app using 'jammy' builder..."
$(PACK_CMD) build sample-kotlin-gradle-app:jammy -v --builder cnbs/sample-builder:jammy --path apps/kotlin-gradle $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)
@echo "> Creating 'kotlin-gradle' app using 'noble' builder..."
$(PACK_CMD) build sample-kotlin-gradle-app:noble -v --builder cnbs/sample-builder:noble --path apps/kotlin-gradle $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

@echo "> Creating 'ruby-bundler' app using 'jammy' builder..."
$(PACK_CMD) build sample-ruby-bundler-app:jammy -v --builder cnbs/sample-builder:jammy --path apps/ruby-bundler $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)
@echo "> Creating 'ruby-bundler' app using 'noble' builder..."
$(PACK_CMD) build sample-ruby-bundler-app:noble -v --builder cnbs/sample-builder:noble --path apps/ruby-bundler $(PULL_POLICY_NEVER) $(PACK_BUILD_FLAGS)

build-linux-packages: build-sample-root
@echo "> Creating 'hello-world' buildpack package"
Expand All @@ -94,10 +94,10 @@ deploy-linux-bases:
docker push cnbs/sample-base-run:alpine
docker push cnbs/sample-base-build:alpine

@echo "> Deploying 'jammy' base images..."
docker push cnbs/sample-base:jammy
docker push cnbs/sample-base-run:jammy
docker push cnbs/sample-base-build:jammy
@echo "> Deploying 'noble' base images..."
docker push cnbs/sample-base:noble
docker push cnbs/sample-base-run:noble
docker push cnbs/sample-base-build:noble

deploy-linux-packages:
@echo "> Deploying linux packages..."
Expand All @@ -109,23 +109,23 @@ deploy-linux-builders:
docker run cnbs/sample-builder:alpine ls /cnb/extensions/samples_curl || true
docker push cnbs/sample-builder:alpine

@echo "> Deploying 'jammy' builder..."
docker push cnbs/sample-builder:jammy
@echo "> Deploying 'noble' builder..."
docker push cnbs/sample-builder:noble

clean-linux:
@echo "> Removing 'alpine' base images..."
docker rmi cnbs/sample-base:alpine || true
docker rmi cnbs/sample-base-run:alpine || true
docker rmi cnbs/sample-base-build:alpine || true

@echo "> Removing 'jammy' base images..."
docker rmi cnbs/sample-base:jammy || true
docker rmi cnbs/sample-base-run:jammy || true
docker rmi cnbs/sample-base-build:jammy || true
@echo "> Removing 'noble' base images..."
docker rmi cnbs/sample-base:noble || true
docker rmi cnbs/sample-base-run:noble || true
docker rmi cnbs/sample-base-build:noble || true

@echo "> Removing builders..."
docker rmi cnbs/sample-builder:alpine || true
docker rmi cnbs/sample-builder:jammy || true
docker rmi cnbs/sample-builder:noble || true

@echo "> Removing 'alpine' apps..."
docker rmi sample-hello-moon-app:alpine || true
Expand All @@ -134,13 +134,13 @@ clean-linux:
docker rmi sample-java-maven-app:alpine || true
docker rmi sample-kotlin-gradle-app:alpine || true

@echo "> Removing 'jammy' apps..."
docker rmi sample-hello-moon-app:jammy || true
docker rmi sample-hello-processes-app:jammy || true
docker rmi sample-hello-world-app:jammy || true
docker rmi sample-java-maven-app:jammy || true
docker rmi sample-kotlin-gradle-app:jammy || true
docker rmi sample-ruby-bundler-app:jammy || true
@echo "> Removing 'noble' apps..."
docker rmi sample-hello-moon-app:noble || true
docker rmi sample-hello-processes-app:noble || true
docker rmi sample-hello-world-app:noble || true
docker rmi sample-java-maven-app:noble || true
docker rmi sample-kotlin-gradle-app:noble || true
docker rmi sample-ruby-bundler-app:noble || true

@echo "> Removing packages..."
docker rmi cnbs/sample-package:hello-world || true
Expand Down
2 changes: 1 addition & 1 deletion apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
To build images for most of these apps, simply execute:

```bash
pack build -p apps/<APP> --builder cnbs/sample-builder:<jammy OR alpine> sample-app
pack build -p apps/<APP> --builder cnbs/sample-builder:<noble OR alpine> sample-app
```

_After building the app you should be able to simply run it via `docker run -it -p 8080:8080 sample-app`.
Expand Down
2 changes: 1 addition & 1 deletion apps/bash-script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pack build sample-bash-script-app --builder cnbs/sample-builder:alpine
OR

```bash
pack build sample-bash-script-app --builder cnbs/sample-builder:jammy
pack build sample-bash-script-app --builder cnbs/sample-builder:noble
```

### Extended Functionality
Expand Down
2 changes: 1 addition & 1 deletion base-images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Usage:
Example:

```bash
./build-stack.sh jammy
./build-stack.sh noble
```

To use this stack see the [sample builders](../builders)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:jammy
FROM ubuntu:noble

# Workaround for docker <= 20.10.9
RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/' /etc/apt/apt.conf.d/docker-clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN apt update && \
COPY ./bin/yj-linux /usr/local/bin/yj

# Create user and group
ARG cnb_uid=1000
ARG cnb_gid=1000
ARG cnb_uid=1001
ARG cnb_gid=1001
RUN groupadd cnb --gid ${cnb_gid} && \
useradd --uid ${cnb_uid} --gid ${cnb_gid} -m -s /bin/bash cnb

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ARG base_image
FROM ${base_image}

# Create user and group
ARG cnb_uid=1000
ARG cnb_gid=1000
ARG cnb_uid=1001
ARG cnb_gid=1001
RUN groupadd cnb --gid ${cnb_gid} && \
useradd --uid ${cnb_uid} --gid ${cnb_gid} -m -s /bin/bash cnb

Expand Down
2 changes: 1 addition & 1 deletion builders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A sample of builders that use the [base images](../base-images/) in this repo.

### Contains:
- [Alpine](alpine/)
- [Jammy](jammy/)
- [noble](noble/)

### Additional Resources

Expand Down
6 changes: 3 additions & 3 deletions builders/jammy/README.md → builders/noble/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sample Jammy Builder
# Sample noble Builder

### Prerequisites
* [Pack](https://buildpacks.io/docs/install-pack/)
Expand All @@ -8,13 +8,13 @@
#### Creating the builder

```bash
pack builder create cnbs/sample-builder:jammy --config builder.toml
pack builder create cnbs/sample-builder:noble --config builder.toml
```

#### Build app with builder

```bash
pack build sample-app --builder cnbs/sample-builder:jammy --path ../../apps/java-maven/
pack build sample-app --builder cnbs/sample-builder:noble --path ../../apps/java-maven/
```

_After building the app you should be able to simply run it via `docker run -it -p 8080:8080 sample-app`.
Expand Down
10 changes: 5 additions & 5 deletions builders/jammy/builder.toml → builders/noble/builder.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ version = "0.0.1"

# Base images used to create the builder
[build]
image = "cnbs/sample-base-build:jammy"
image = "cnbs/sample-base-build:noble"
[run]
[[run.images]]
image = "cnbs/sample-base-run:jammy"
image = "cnbs/sample-base-run:noble"

# Stack (deprecated) used to create the builder
[stack]
id = "io.buildpacks.samples.stacks.jammy"
build-image = "cnbs/sample-base-build:jammy"
run-image = "cnbs/sample-base-run:jammy"
id = "io.buildpacks.samples.stacks.noble"
build-image = "cnbs/sample-base-build:noble"
run-image = "cnbs/sample-base-run:noble"
2 changes: 1 addition & 1 deletion buildpacks/hello-moon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ pack build sample-hello-moon-app --builder cnbs/sample-builder:alpine --buildpac
OR

```bash
pack build sample-hello-moon-app --builder cnbs/sample-builder:jammy --buildpack ../hello-world/ --buildpack .
pack build sample-hello-moon-app --builder cnbs/sample-builder:noble --buildpack ../hello-world/ --buildpack .
```
2 changes: 1 addition & 1 deletion buildpacks/hello-processes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pack build sample-hello-processes-app --builder cnbs/sample-builder:alpine --bu
OR

```bash
pack build sample-hello-processes-app --builder cnbs/sample-builder:jammy --buildpack ../java-maven --buildpack . --path ../../apps/java-maven
pack build sample-hello-processes-app --builder cnbs/sample-builder:noble --buildpack ../java-maven --buildpack . --path ../../apps/java-maven
```

#### Run
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/hello-universe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OR

```bash
pack build sample-hello-universe-app \
--builder cnbs/sample-builder:jammy \
--builder cnbs/sample-builder:noble \
--buildpack . \
--buildpack ../hello-world/ \
--buildpack ../hello-moon/
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pack build sample-hello-world-app --builder cnbs/sample-builder:alpine --buildpa
OR

```bash
pack build sample-hello-world-app --builder cnbs/sample-builder:jammy --buildpack .
pack build sample-hello-world-app --builder cnbs/sample-builder:noble --buildpack .
```

THEN
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/java-maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ pack build sample-java-maven-app --builder cnbs/sample-builder:alpine --buildpac
OR

```bash
pack build sample-java-maven-app --builder cnbs/sample-builder:jammy --buildpack . --path ../../apps/java-maven
pack build sample-java-maven-app --builder cnbs/sample-builder:noble --buildpack . --path ../../apps/java-maven
```
2 changes: 1 addition & 1 deletion buildpacks/kotlin-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ pack build sample-kotlin-gradle-app --builder cnbs/sample-builder:alpine --build
OR

```bash
pack build sample-kotlin-gradle-app --builder cnbs/sample-builder:jammy --buildpack . --path ../../apps/kotlin-gradle
pack build sample-kotlin-gradle-app --builder cnbs/sample-builder:noble --buildpack . --path ../../apps/kotlin-gradle
```
2 changes: 1 addition & 1 deletion buildpacks/ruby-bundler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Compatible apps:
### Usage

```bash
pack build sample-ruby-bundler-app --builder cnbs/sample-builder:jammy --buildpack . --path ../../apps/ruby-bundler
pack build sample-ruby-bundler-app --builder cnbs/sample-builder:noble --buildpack . --path ../../apps/ruby-bundler
```

0 comments on commit b35a928

Please sign in to comment.