This commit introduces the ability to substitute environment variables
within the 'environment' section of the service definition.
This allows for more dynamic configuration of services.
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
The Compose Specification supports adding labels to the build image
which is also used in practice. Support this and pass the labels to
`podman build`.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
docker-compose uses the path to the compose file even if it's symlink to
get the context directory.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This is the behavior exhibited by docker compose. The network names are
user-visible through external networks, so previously anyone who
migrated from docker-compose needed to change their configuration. Now
it is possible to select compatibility via a flag in x-podman global
dictionary.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit adds a .gitignore in tests/env-file-tests to allow .env files
to be committed.
Fix: #937
Signed-off-by: Genzer <732937+Genzer@users.noreply.github.com>
This commit loads dotenv `.env` (exactly that name) from the following location (the later takes
precedence):
- The `.env` file in the Compose file's directory.
- The `.env` file in the current working directory (invoking podman-compose).
This preserves the behavior prior to 1.1.0 and to match with Docker Compose CLI.
Fix: https://github.com/containers/podman-compose/issues/937
Signed-off-by: Genzer <732937+Genzer@users.noreply.github.com>
Default command line argument `in_pod` was set to True, but this breaks
the compose file for users who want to use `--userns` argument. This
commit sets default `in_pod` value to None, and later resolves whether
to create a pod by checking compose file, as new argument in compose
file x-podman is now available. Now it is convenient for users to pass
custom `in_pod` value (True or False) as a compose file argument when
command line value of `in_pod` is not provided.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
based on seccomp test. Without the selinux option, visiting localhost:8080
will give a 404 error because httpd cannot access the file, but with selinux: z
the context for the file will be appropriately updated so httpd can access it
Signed-off-by: charliemirabile <46761267+charliemirabile@users.noreply.github.com>
to make them available for "RUN --mount=type=secret" statements inside the
Dockerfile.
Keep using --volume to pass file secrets to "podman run".
Signed-off-by: wiehe <28457227+wiehe@users.noreply.github.com>
unittest is much more straightforward without any magic. In a small
project like podman-compose being easy to understand is more important
than features.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
Not at 100% yet. But upped code coverage significantly and covered major
async calls.
Signed-off-by: Falmarri <463948+Falmarri@users.noreply.github.com>