* feat(core): translate LocalStack variables in Java instead of the entrypoint
The LocalStack-to-Floci variable mapping (PERSISTENCE, EDGE_PORT,
LOCALSTACK_HOST, GATEWAY_LISTEN, LS_LOG/DEBUG, the Lambda and Docker
variables, the DNS suffixes, USE_SSL, CUSTOM_SSL_CERT_PATH) lived in
docker/localstack-parity.sh, sourced by the image's entrypoint. A JVM run or
a native binary on the host never saw it.
LocalStackParity now computes the same mapping and LocalStackParityConfigSource
serves it at ordinal 301, just above environment variables, as the exported
variables did. A key is produced only when its Floci variable is unset, so an
explicit Floci setting still wins; the DNS suffixes are still appended to any
configured ones; LOCALSTACK_PARITY=false still turns it all off.
TlsConfigSource, which reads its properties before the configuration exists,
consults the mapping too.
The script, its shell test and every Dockerfile copy of it are removed; the
test cases move to LocalStackParityTest.
Refs #5767
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(core): keep TLS backends on loopback, keep configured DNS suffixes, and pass LocalStack settings to hooks
Review follow-ups for the Java LocalStack translation:
- Dockerfile.compat took docker-entrypoint.sh from the published native
image, which still sourced the removed localstack-parity.sh, so the compat
image never became healthy. It now copies the entrypoint from the build
context, as it already does healthcheck.sh.
- At ordinal 301 the parity source outranked TlsConfigSource's loopback pin
(300): with TLS on and GATEWAY_LISTEN set, the backends bound the gateway
address while the proxy dialled 127.0.0.1. It now sits at 299, below
environment variables and the TLS source and above .env and
config/application.yml, where the exported variables used to be.
- floci.dns.extra-suffixes is no longer a translated property, which on JVM
and native runs replaced suffixes set in application.yml. The five
readers append LocalStack's and Floci's suffixes to the configured list
through LocalStackParity.withDnsSuffixes instead.
- GATEWAY_LISTEN=0.0.0.0:4566 (or [::]:4566, or a list) gives the host to
quarkus.http.host and the port to floci.port when EDGE_PORT is unset,
instead of a host Floci rejects as malformed.
- Init hooks get the translation as FLOCI_*/QUARKUS_* variables again, as
they did when the entrypoint exported them.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(core): parse LOCALSTACK_HOST and GATEWAY_LISTEN the way LocalStack does
Both take LocalStack's host-and-port forms (HostAndPort.parse in its
config.py): host:port, host, :port, [v6]:port and [v6].
- LOCALSTACK_HOST is <hostname>:<port>, localhost.localstack.cloud:4566 by
default. Its port went into floci.hostname, so the base URL came out as
http://localhost.localstack.cloud:4566:4566. floci.hostname now gets the
host alone.
- GATEWAY_LISTEN=:4566, LocalStack's default host on 4566, did not match
and stopped startup with "Refusing to listen on malformed host". An empty
host now keeps Floci's own bind address and takes just the port.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* perf(docker): cut healthy wait from 5 s to 0.1 s
* fix(docker): wait up to 5 s for ready hooks before reporting healthy
* fix(docker): build without pulling a Dockerfile frontend from Docker Hub
The compat image's ubi9-minimal:9.7 ships openssl-libs-3.5.1-7.el9_7, which is below the 3.5.5-4.el9_8 that Red Hat fixed CVE-2026-45445 in. ubi9-minimal:9.8 ships 3.5.8-1.el9_8, so the bump is the remediation.
The native bases move with it for currency rather than for that CVE: ubi9-micro ships no openssl at either tag, on any architecture. It picks up glibc 2.34-231.el9_7.10 to 2.34-275.el9_8 plus libcap and tzdata, and keeps both images on one RHEL minor stream, which matters because the compat image builds on top of the native one.
Package contents were read from the Red Hat container catalog for every architecture the images publish.
* fix: enforce safe default network binding
* fix(config): keep signed test authority stable
Pin the integration-test listener to the existing all-interface test bind and
opt into that bind only in the test profile. This preserves localhost-based
SigV4 fixtures while production keeps the loopback default.
* fix(config): keep compat image backward compatible
* chore: retrigger CI
* fix(config): mirror JVM image network binding
The AWS CLI v2 install ships 26 MB of `aws <command> help` example pages
that were never viewable in this image: help rendering needs groff or
mandoc and ubi9-minimal has neither, so `aws sqs help` already failed
before this change. Tab completion has no user inside a container either,
so aws_completer (9 MB), its ac.index database (21 MB) and the /usr/bin
symlink the installer creates go with it. The command reference the CLI
reads at run time (dist/awscli/data) stays.
pip and setuptools stay: the image documents pip and init hooks use it to
install packages. The system Python loses only build-time extras nothing
imports at run time: the optimised .pyc variants, lib2to3 and ensurepip
(removed with a python3 one-liner, ubi9-minimal has no find). awslocal's
mode is set in the COPY instead of a chmod layer.
Measured on arm64 on top of #3085: compat image 924 to 839 MB on disk,
214.0 to 197.7 MB gzip; /usr/local/aws-cli 264 to 209 MB. Verified: aws
2.36.24, `aws sqs list-queues` still resolves its model, pip3 installs a
package, boto3 1.42.97 import with json, ssl and sqlite3, awslocal, init
hooks calling all three, the container healthy in 5 s, and the four
endpoint-resolution checks compatibility.yml runs against this image.
* perf(docker): move the native image to ubi9-micro
The binary needs only libc, and since #3037 the entrypoint needs only
bash and coreutils. ubi9-micro has both at 7 MB compressed instead of
ubi9-minimal's 40 MB. Measured on arm64 with the nightly-09042026
binary: 109 MB to about 78 MB compressed, 313 MB to 229 MB uncompressed.
ubi9-micro has no useradd and no curl, so the user is one /etc/passwd
line and the healthcheck is a bash /dev/tcp probe. Dockerfile.native
gets the same runtime stage and loses its unused gosu tools stage.
Dockerfile.compat needs microdnf, so it now starts from ubi9-minimal
and copies /app out of the native image.
* chore(docker): share the health probe and split the compat tools stage
The bash health probe is now docker/healthcheck.sh, used by all three
Dockerfiles. Dockerfile.compat gets a version independent tools stage;
the aws CLI shim test and the cache warm job build target: tools, so
they pull no floci image and their cached layers stay stable. ARG
VERSION and the native RUN steps move so only the binary copy changes
between builds.
* fix(docker): copy healthcheck.sh into the compat image from the build context
* ci(compat): build the whole compat image on pull requests and check it starts healthy
* fix(compat): shim aws to inject --endpoint-url from AWS_ENDPOINT_URL, add CI smoke test
* fix(compat): migrate to AWS CLI v2, drop the endpoint-url shim
---------
Co-authored-by: doraemon2200 <106516578+doraemon2200@users.noreply.github.com>
* 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
* 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
* 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