build: add native build and unregistry push script

scripts/build-and-push.sh builds the native image with the Mandrel
Dockerfile and pushes it to a remote Docker host via docker-pussh
(unregistry), transferring only missing layers over SSH.

- Name and tag default to pom.xml artifactId/version (overridable)
- Builds for linux/amd64; --skip-build to pussh only
- Verifies image presence on the remote after push and prints
  a ready-to-use docker run hint

README updated with a 'Building and deploying natively' section.
This commit is contained in:
2026-09-07 18:02:37 -03:00
parent 73875aab94
commit ceebfb33f8
2 changed files with 210 additions and 0 deletions
+14
View File
@@ -4,6 +4,20 @@ This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
## Building and deploying natively
Build the native image with the Mandrel-based multi-stage Dockerfile and push it
directly to a remote Docker host via [unregistry](https://github.com/psviderski/unregistry)
(no external registry required; only missing layers are transferred over SSH):
```shell script
./scripts/build-and-push.sh --remote deploy@prod.example.com
```
The script reads `artifactId` and `version` from `pom.xml` for the image name
and tag, builds for `linux/amd64`, and verifies the image is present on the
remote after pushing. See `./scripts/build-and-push.sh --help` for all flags.
## Running the application in dev mode
You can run your application in dev mode that enables live coding using: