* ci: add reusable image publishing
Provide a workflow_call contract that builds native amd64 and arm64 artifacts and publishes native and compat multi-architecture images for an exact caller-selected source revision. Keep registry authority in the caller and return immutable digest references plus provenance for downstream tests.
* fix(docker): use glibc in JVM development image
Use an Ubuntu-based Java 25 runtime so the JVM image can host glibc-linked integrations while preserving the existing entrypoint, tooling, and architecture behavior.
* ci: publish JVM images by default
* fix(ci): harden reusable image builds
* docs(ci): clarify image registry input
* fix(docker): locate the installed AWS CLI
* fix(ci): tag images by build time and revision
Both native Dockerfiles wrote the ~196 MB binary into the image twice. A RUN that
renames or chmods a large file rewrites the whole file into a new layer, so the
published image carried two copies of it:
110 MB ubi9-minimal base
18.8 MB microdnf install
196 MB COPY --chown=1001:root native/<arch>/ /app/
196 MB RUN mv /app/*-runner /app/application && chmod +x /app/application
Set the mode in the COPY itself and move the rename out of the image and into the
build pipeline, which now stages the binary as native/<arch>/application.
Dockerfile.native does the same with a single COPY --chmod=755 --from=build.
Measured on linux/arm64 against floci/floci:1.5.34, with a 196 MB binary on both
sides so the comparison is like for like:
uncompressed 521 MB -> 325 MB
compressed 168 MB -> 104 MB (sum of gzip -6 layer blobs; Docker Hub
reports 166.1 MB for 1.5.34)
layers 8 -> 6
No behaviour change. The only filesystem difference in the resulting image is
quarkus-artifact.properties, now 0755 rather than 0644, because --chmod applies to
every file in the staged directory. /app and /app/data keep 0775 and uid 1001:0 for
arbitrary-uid (OpenShift) runs, and /app/application keeps 0755 — docker/entrypoint.sh
gates its default command on [ -x /app/application ].
When the persistent path is not writable (read-only or root-owned bind
mounts), S3Service's constructor failed lazily and every S3 request
surfaced as an opaque plain-text 500 that REST-XML SDK parsers cannot
read.
- validate the persistent path at boot and refuse to start with an
actionable error when any enabled service uses non-memory storage
- add class-scoped exception mappers so unhandled failures on S3 and
S3-Control routes render the S3 InternalError XML contract instead of
Quarkus's plain-text error page
- warn loudly from the container entrypoint when the state dir is not
writable by the runtime user
Fixes#1664
* fix(docker): enable TLS and sync docker test runner with compatibility workflow
The local docker compose stack ran without FLOCI_TLS_ENABLED and the EC2 mock,
and run-docker-tests.sh lacked the hot-reload bind mount, so the node TLS/WSS
suites and the Java Lambda hot-reload test failed locally while passing in CI.
Mirror the compatibility workflow's configuration so local runs exercise the
same setup.
* fix: remove FLOCI_SERVICES_EC2_MOCK from docker-compose
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* test(iot): wait for broker port release in MQTT lazy-startup test
Vert.x MqttServer.close() can resolve before the OS releases the listening
socket, so a connect immediately after stop() may still succeed. @BeforeEach
now polls until the port refuses connections before each test asserts the
broker is not listening, fixing the IotMqttLazyStartupIntegrationTest flake
under the full ordered suite that was failing CI on main.
* chore(release): set version to 1.5.28
Align pom.xml with the 1.5.28 release commit and CHANGELOG header; it had
been left at 1.6.0.
* ci: make run-docker-tests.sh executable
The compat test runner lacked the execute bit, so ./docker/run-docker-tests.sh
failed with permission denied (exit 126).
Replace the in-container GraalVM build (docker/Dockerfile.native) with a
runner build via graalvm/setup-graalvm + Maven cache, using the -Ob quick
build (appended so application.yml native args are preserved). The prebuilt
binary is packaged through docker/Dockerfile.native-package, matching the
nightly/release pipeline. Both jobs run on ubuntu-24.04-arm.
Drop the JVM build/compat-test jobs and run the full 8-test matrix against
the native image (porting the compat-cdk Docker-socket case). Remove the now
orphaned docker/Dockerfile.jvm-package.
* chore(docker): add OCI image metadata labels
Add OCI image spec labels to Dockerfile.native-package, Dockerfile.jvm-package,
and Dockerfile.compat so published images carry standard metadata.
Static labels (title, description, url, source, licenses, vendor) are baked into
the Dockerfiles and are present in every build including local ones. Dynamic labels
(version, revision, created) are injected at publish time via the labels: input of
build-push-action in release.yml and nightly.yml.
Closes#851
* chore: setting not opencontainers labels
*.s3.localhost.floci.io, *.localhost.localstack.cloud, and
*.s3.localhost.localstack.cloud as virtual-hosted style regardless of
FLOCI_HOSTNAME — fixes 405 when SDK uses endpointOverride("http://localhost:4566")
without forcePathStyle (closes#801)
- EmbeddedDnsServer ships localhost.localstack.cloud and localhost.floci.io
as built-in suffixes so spawned containers resolve these domains to Floci's
IP without extra config
- Compatibility test S3VirtualHostStyleTest covers the full virtual-host path
end-to-end; TestFixtures.s3VirtualHostClient() prefers s3.localhost.floci.io,
falls back to s3.localhost.localstack.cloud, or uses FLOCI_S3_VHOST_ENDPOINT
in Docker
- run-docker-tests.sh and compatibility.yml inject --dns <floci-ip> and
FLOCI_S3_VHOST_ENDPOINT=http://floci:4566 into test containers
- S3 and migrate-from-localstack docs updated with virtual-hosted style details
* feat: optional TLS/HTTPS support with self-signed certificate generation
- Add TlsConfigSource (MicroProfile ConfigSource SPI) that injects Quarkus
TLS properties before the HTTP server starts
- Auto-generate self-signed certificates with correct SANs including custom
hostnames from FLOCI_HOSTNAME and FLOCI_BASE_URL
- Persist certificate metadata for change detection across restarts
- Fix CertificateGenerator to encode IP addresses as iPAddress SANs (RFC 5280)
- Serve HTTP + HTTPS simultaneously (LocalStack parity)
- Support user-provided certificates via FLOCI_TLS_CERT_PATH/KEY_PATH
- Add TLS configuration documentation
- Add Node.js SDK compatibility test for HTTPS connectivity
- Add comprehensive unit and integration tests (79 test cases)
Closes#711
* feat(tls): add TLS proxy server and WebSocket-over-TLS tests
- Add TlsProxyServer: TCP proxy on port 4566 that detects TLS ClientHello
and routes to HTTPS (4511) or HTTP (4510) backend accordingly
- Add apigatewayv2-websocket-tls.test.ts: WSS compatibility tests covering
connect/disconnect, route selection, broadcast, authorization,
@connections API, binary frames, and payload size limits
- Update CI workflow to enable FLOCI_TLS_ENABLED=true for compat tests
- Update sdk-test-node Dockerfile with NODE_TLS_REJECT_UNAUTHORIZED=0
- Update tls.test.ts for HTTPS SDK client tests
- Update README with WebSocket-over-TLS test documentation
* fix(tls): address review comments — LocalStack parity and floci.io SANs
- Add USE_SSL and CUSTOM_SSL_CERT_PATH mappings to localstack-parity.sh
- Add localhost.floci.io and *.localhost.floci.io to default certificate SANs
- Update affected tests and documentation
---------
Co-authored-by: Dixit R Jain <dixitrjain@Mac-379.lan>
Co-authored-by: Dixit R Jain <dixitrjain@Mac.lan>
* chore(docker): ship awslocal wrapper in the -compat image
bin/awslocal was added to the repo in #638 but is not COPYed into any of
the published Docker images. That makes existing LocalStack init scripts
mounted at /etc/localstack/init/ready.d/ — which overwhelmingly use
`awslocal kinesis …` rather than `aws --endpoint-url=… kinesis …` —
fail with "command not found" on the supposedly drop-in -compat image.
The script also needed an entry in .dockerignore: the file is allow-list
style ("*" + "!path") and bin/awslocal was not in the allow list, so it
never reached the build context. Without that line the COPY fails with
"file not found in build context".
Closes#744. The orthogonal SQS endpoint-resolver issue tracked in #745
is unaffected by this change — awslocal as written only exports
AWS_ENDPOINT_URL, which the bundled botocore silently ignores for SQS.
* fix(awslocal): pass --endpoint-url explicitly to honor hard-pin contract
LocalStack's awslocal idiom is "hard-pin the endpoint" — that's the whole
point of the wrapper. Setting AWS_ENDPOINT_URL alone is not sufficient:
the bundled aws-cli/1.44.87 + botocore/1.42.97 silently bypasses the env
var for SQS via service-specific endpoint resolvers, sending requests
to public AWS. With real credentials in CI/dev, that would silently
provision real SQS queues — surfacing as the InvalidClientTokenId error
documented in #745.
Inject --endpoint-url before "$@" so the user's own --endpoint-url (if
any) still wins via last-flag-wins. Verified: awslocal sqs create-queue
and list-queues now route to Floci; kinesis/s3 still work; awslocal env
subcommand unaffected; user override behaves correctly.
Addresses Copilot's review feedback on #746 and the awslocal arm of #745.
- Translate LocalStack env vars (LOCALSTACK_HOST, PERSISTENCE, LAMBDA_DOCKER_NETWORK, etc.)
to Floci equivalents automatically at startup; opt out with LOCALSTACK_PARITY=false
- Serve /_localstack/init and /_localstack/health alongside /_floci/* equivalents
- Report executed scripts with path, state, and return_code in /_floci/init response
- Add /_aws/sqs/messages GET (non-destructive peek) and DELETE (purge) inspection endpoint
- Add /_aws/execute-api/{apiId}/{stageName} LocalStack-compat path for REST API invocation
- Add four-phase init hook lifecycle (boot/start/ready/stop) with dual-path discovery
(/etc/floci/init/ and /etc/localstack/init/ compat paths)
- Install Python 3, AWS CLI, boto3 in standard image; wrap aws binary to pre-configure
--endpoint-url=http://localhost:4566 so init scripts need no extra flags
- Wire entrypoint.sh + gosu privilege drop into all Dockerfile variants
- Add migration guide and update README, docker-compose, docker-images, SQS, and
initialization-hooks docs
The published images run as USER 1001 with primary group root. On Docker
Desktop (macOS/Windows) /var/run/docker.sock is owned root:root inside
containers so the floci process can open it via the group-0 bit, but on
native Linux Docker (and Rootless/Podman) the socket is owned by
root:<docker-group> with mode 660 — and the floci user is not a member
of that group. This silently breaks ECR, Lambda, and RDS service
emulation on those hosts: floci's docker-java client gets BindException
/ SocketException and reports CREATE_FAILED on AWS::ECR::Repository.
Fix: ship a docker/entrypoint.sh modeled on the docker-library/postgres
pattern. It starts as root, stats the bind-mounted socket to learn the
host's docker GID, ensures a group with that GID exists, adds the floci
user to it, then `exec gosu floci` re-execs the same script as uid 1001
with the supplementary group set. The 'if id -u == 0' guard means
downstream `user:` overrides in compose files keep working unchanged.
Verified end-to-end on native Linux (Pop!_OS, docker GID 999) using a
minimal CDK bootstrap repro: AWS::ECR::Repository goes from CREATE_FAILED
to CREATE_COMPLETE and the registry:2 sidecar comes up cleanly. pid 1
runs as Uid:1001 Gid:0 Groups:999.
Implementation notes:
- All three Dockerfiles keep their original base images
(quarkus-micro-image, ubi9-minimal, eclipse-temurin alpine).
- Dockerfile.native gains a tools builder stage that uses the canonical
Red Hat pattern (`dnf install --installroot`) to install shadow-utils
into a stagable /toolsroot, which the runtime stage wholesale-copies
into quarkus-micro-image. Image growth: ~42 MB (quarkus-micro has no
package manager and lacks groupadd/usermod by itself).
- Dockerfile.native-package adds shadow-utils via microdnf (already had
the package manager).
- Dockerfile.jvm-package adds shadow + ca-certificates via apk so the
entrypoint can use the same useradd/groupadd/usermod syntax across
all three image variants.
- gosu 1.17 is downloaded and SHA256-pinned (rather than GPG-verified
as Postgres does) to avoid pulling gnupg2 into the runtime layers
and to sidestep a gpgme dependency conflict in ubi9-minimal.