Commit Graph

179 Commits

Author SHA1 Message Date
Muayyad alsadi
a7f97b6120 implement -e in run 2021-05-06 01:17:01 +03:00
Diogo Galvão
0ea18b4419 Force adding an .env file for the tests 2021-05-06 00:50:41 +03:00
Muayyad alsadi
905914b0dc Merge branch 'garotosopa-devel' into devel 2021-05-06 00:49:54 +03:00
Muayyad alsadi
00840d0613 resolve conflict 2021-05-06 00:49:42 +03:00
Diogo Galvão
2ad7daa81f Test variable interpolation in the YAML 2021-05-06 00:44:46 +03:00
Daniel Helgenberger
080b8a369e Prefer 'compose.yaml' as per compose spec
https://github.com/compose-spec/compose-spec/blob/master/spec.md#compose-file
2021-05-05 17:32:25 +03:00
Joakim Repomaa
226ac4fb3a fix missing --label flag in volume creation 2021-05-05 02:13:42 +03:00
Eric Lathrop
030a196102 Fix README typo 2021-04-29 19:20:47 +03:00
SsjackX
901213e5b3 Update podman_compose.py
repair mode written as size
2021-04-29 19:20:26 +03:00
Christian Taedcke
b3370603d9 Add support for sysctls in compose file 2021-04-29 19:19:42 +03:00
Radoslaw Smigielski
b3090c3c3a Mode Python installation and test deps to requirement files
Installation with setup.py fails on missing yaml package, which should
be installed by "install_requires" but this also does not work because
podman_compose.__version__ also needs yaml.
Put all the Python dependencies into separate files:
    - requirements.txt
    - test-requirements.txt
2021-04-29 19:19:14 +03:00
Marcello Sylvester Bauer
5fabfee497 Support annotations
Support annotations analog to "security opt" in commit 29e2bf4c.

Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
2021-04-29 19:18:29 +03:00
Sebastian Ramirez Magri
75a63df954 fix: check .env in current dir with isfile instead of exists
This prevents cases in which an `.env` directory exists, for example
in Python projects with a local virtual environment, and then
dotenv gets passed the directory path as input.
2021-04-29 19:18:06 +03:00
Joakim Repomaa
08dd36f4c1 Add docker-compose labels for interoperability 2021-04-29 19:17:20 +03:00
Martin Häcker
669953b3d3 Rework argument generation to adhere directly to what podman accepts. 2021-04-29 19:10:55 +03:00
Martin Häcker
d3df688aee Remove test code 2021-04-29 19:10:55 +03:00
Martin Häcker
bda7b5e812 Add exec support 2021-04-29 19:10:55 +03:00
Muayyad alsadi
6289d25a42 fixes #236: compatible with docker-compose 2020-12-02 15:31:51 +02:00
Andreas Kohn
abc08135ba Only pull each image once 2020-11-27 18:09:58 +02:00
Daniel Helgenberger
9cd837f01d Fixes #236: Ensure project name works with podman
In case we use dir_basename as podman project name, ensure it matches
podman project name requirement regex: [a-zA-Z0-9][a-zA-Z0-9_.-]*
2020-11-19 17:52:49 +02:00
Davide Madrisan
a4b8b5e709 Fix 'podman-compose version' with no compose file in the working directory
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2020-11-19 14:51:06 +02:00
Muayyad alsadi
5971f57130 FIXES #249: update dotenv with some envs 2020-11-05 00:14:57 +02:00
Muayyad alsadi
ab96f12dba FIXES #249: update dotenv with some envs 2020-11-05 00:08:19 +02:00
Jonas Eriksson
f6a3cb0aff Allow environment variables to be unset
Leaving keys with empty values in YAML will result in the value
ending up being None after parsing the configuration file. This
should result in the variable being imported from the external
environment according to the Compose file version 3 reference.
The resulting action for podman should be an added "-e VAR"
(without =), which is working correctly.

However, when overwriting an external variable by setting it to
e.g. "", the result in docker-compose is that the variable is
unset. For podman, this means adding "-e VAR=". This is not the
case, and this patch does a more strict check to make this case
behave correctly.
2020-10-12 12:45:14 +03:00
Jonas Eriksson
497355fcfb Re-order environment/env_files to match compose
docker-compose reads the 'env_files' and adds the content as
environment values before adding the 'environment' data. This
means that that 'environment' data overrides 'env_files' data.
Emulate this behaviour by re-ordering -e statements to end up
after --env-file statements.

Relevant function in docker-compose can be viewed here:
https://github.com/docker/compose/blob/1.27.4/compose/config/config.py#L694-L697
2020-10-08 23:25:52 +03:00
Florian Bezannier
20a86ea563 add --no-cache arg to build 2020-09-27 14:14:55 +03:00
Florian BEZANNIER
4e2e960106 build specific service 2020-09-27 14:14:55 +03:00
pinfort
efba3a1380 support str style configuration for env_file 2020-09-10 00:59:51 +03:00
Johannes Laurin Hörmann
90639769f0 BUG: 'podman stop -t 360.0' called for float, expects int on cli 2020-09-06 12:22:01 +03:00
Johannes Laurin Hörmann
3712b545a9 ENH: add timeout option to podman-compose down, as in https://docs.docker.com/compose/reference/down/ 2020-09-06 12:22:01 +03:00
Chris Hozian
294f8ee37b Hashlib to generate SHA256 instead of MD5 for FIPS
Changed hashlib to generate a SHA256 instead of MD5 in order for
podman-compose to function on systems with FIPS mode enabled.
2020-06-15 22:44:00 +03:00
Michael Scherer
105b129b08 Fix infinite loop
Since we never remove thread from the list of thread, podman-compose
up never return as long as 1 thread is alive.
2020-06-02 23:14:59 +03:00
Muayyad alsadi
d3f37112a7 FIXES #181: accept init and init-path 2020-05-22 23:52:48 +03:00
Johannes Laurin Hoermann
7eacf14693 MAINT: resolve https://github.com/containers/podman-compose/pull/180#issuecomment-632722974 2020-05-22 18:09:25 +03:00
Your Name
8cd98ab708 MAINT: extend instead of append 2020-05-22 18:09:25 +03:00
Your Name
047820dbf1 ENH: Added restart policy forwarding to podmann run, compose build args added to up args 2020-05-22 18:09:25 +03:00
Andrej Zieger
e7b1382b1b Add --build-arg to 'up' (Fixes #161) 2020-05-22 17:06:38 +03:00
Mohamed Akram
64ed554543 Allow empty default/error value in substitution 2020-05-13 17:54:20 +03:00
Daniel J Walsh
0ac75fd361
Merge pull request #172 from TomSweeneyRedHat/sec1
Add Security Policy
2020-05-11 10:59:07 -04:00
TomSweeneyRedHat
93bf39e9e2 Add Security Policy
As the title says, plus a small fix in the readme.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-09 17:54:44 -04:00
Sam Tygier
5915ba345f Catch error when compose file is empty
Also catch cases such as the top element being a list or a string
2020-05-09 20:04:52 +03:00
Muayyad alsadi
1ca6a88ebd target once 2020-04-22 14:44:36 +03:00
Renee Margaret McConahy
7b40079c06 Pass "target" parameter when building an image. 2020-04-22 14:42:32 +03:00
Matt Novenstern
f9915c47b4 Check for target property when building images
For multi-stage builds, this allows picking a stage to build up to
2020-04-22 14:36:35 +03:00
Andrej Zieger
19733407b4 Add support for --build-arg option 2020-04-22 14:31:00 +03:00
Bao Trinh
e8147e350b Add support for cap_add/cap_drop
Currently, `cap_add` and `cap_drop` are being ignored by podman-compose.
Add the arguments (`--cap-add` and `--cap-drop`, respectively) to
`podman create` when appropriate.
2020-04-22 14:27:33 +03:00
Michael Mraka
7f210ffc43 fixing "Error: unknown flag: --shm_size" 2020-04-21 17:12:11 +03:00
Muayyad alsadi
cbed801c0d start detached 2020-04-19 03:53:55 +03:00
Muayyad alsadi
6a42d6861d add ports test 2020-04-18 22:41:06 +03:00
Muayyad alsadi
07a2430c41 Fixes #152: validate that podman is useable 2020-04-18 22:18:36 +03:00