Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility spreadsheet #26

Open
ghost opened this issue Aug 10, 2019 · 9 comments
Open

Compatibility spreadsheet #26

ghost opened this issue Aug 10, 2019 · 9 comments

Comments

@ghost
Copy link

ghost commented Aug 10, 2019

I've noticed https://github.com/muayyad-alsadi/podman-compose/blob/master/CONTRIBUTING.md#missing-commands-help-needed is incomplete.

So I parsed docker-compose commands and added to this spreadsheet https://file.io/1Gx0gD (alternative link: https://filebin.net/258jxepc4lefjmst/podman-compose.ods?t=mlsgj9yu)

Markdown tables are messy so it's an ods file. I'm sure it's easy to convert either with some online service or just export to csv and do a quick replacement.

ps: you don't need to credit me or anything, I'm just trying to help but I'm not much of a programmer

@muayyad-alsadi
Copy link
Collaborator

thank you, this project was started as a simple script that can do two commands up and down no arguments. some commands were hacked over time based on needs of our users.

it was just yesterday when I added proper argument parsing and proper system for sub-commands. I hope during this week (Eid Al-Adha Vacation) I will be able do all of those commands properly with proper options.

@muayyad-alsadi
Copy link
Collaborator

Command Options Description Supported
build --compress Compress the build context using gzip.
--force-rm Always remove intermediate containers.
--no-cache Do not use cache when building the image.
--pull Always attempt to pull a newer version of the image.
-m, --memory MEM Sets memory limit for the build container.
--build-arg key=val Set build-time variables for services.
--parallel Build images in parallel.
bundle --push-images Automatically push images for any services which have a build option specified.
-o, --output PATH Path to write the bundle file to. Defaults to ".dab".
config --resolve-image-digests Pin image tags to digests.
-q, --quiet Only validate the configuration, don't print anything.
--services Print the service names, one per line.
--volumes Print the volume names, one per line.
--hash="*" Print the service config hash, one per line. Set "service1,service2" for a list of specified services or use the wildcard symbol to display all services
create --force-recreate Recreate containers even if their configuration and image haven't changed. Incompatible with --no-recreate.
--no-recreate If containers already exist, don't recreate them. Incompatible with –force-recreate.
--no-build Don't build an image, even if it's missing.
--build Build images before creating containers.
down --rmi type Remove images. Type must be one of: 'all': Remove all images used by any service. 'local': Remove only images that don't have a custom tag set by the image field.
-v, --volumes Remove named volumes declared in the volumes section of the Compose file and anonymous volumes attached to containers.
--remove-orphans Remove containers for services not defined in the Compose file
-t, --timeout TIMEOUT Specify a shutdown timeout in seconds. (default: 10)
events --json Output events as a stream of json objects
exec -d, --detach Detached mode: Run command in the background.
--privileged Give extended privileges to the process.
-u, --user USER Run the command as this user.
-T Disable pseudo-tty allocation. By default docker-compose exec allocates a TTY.
--index=index index of the container if there are multiple instances of a service [default: 1]
-e, --env KEY=VAL Set environment variables (can be used multiple times, not supported in API < 1.25)
-w, --workdir DIR Path to workdir directory for this command.
help
images -q, --quiet Only display IDs
kill -s SIGNAL SIGNAL to send to the container. Default signal is SIGKILL.
logs --no-color Produce monochrome output.
-f, --follow Follow log output.
-t, --timestamps Show timestamps.
--tail="all" Number of lines to show from the end of the logs for each container.
pause
port --protocol=proto tcp or udp [default: tcp]
--index=index index of the container if there are multiple instances of a service [default: 1]
ps -q, --quiet Only display IDs
--services Display services
--filter KEY=VAL Filter services by a property
-a, --all Show all stopped containers (including those created by the run command)
pull --ignore-pull-failures Pull what it can and ignores images with pull failures.
--parallel Deprecated, pull multiple images in parallel (enabled by default).
--no-parallel Disable parallel pulling.
-q, --quiet Pull without printing progress information
--include-deps Also pull services declared as dependencies
push --ignore-push-failures Push what it can and ignores images with push failures.
restart -t, --timeout TIMEOUT Specify a shutdown timeout in seconds. (default: 10)
rm -f, --force Don't ask to confirm removal
-s, --stop Stop the containers, if required, before removing
-v Remove any anonymous volumes attached to containers
run -d, --detach Detached mode: Run container in the background, print new container name.
--name NAME Assign a name to the container
--entrypoint CMD Override the entrypoint of the image.
-e KEY=VAL Set an environment variable (can be used multiple times)
-l, --label KEY=VAL Add or override a label (can be used multiple times)
-u, --user="" Run as specified username or uid
--no-deps Don't start linked services.
--rm Remove container after run. Ignored in detached mode.
-p, --publish=[] Publish a container's port(s) to the host
--service-ports Run command with the service's ports enabled and mapped to the host.
--use-aliases Use the service's network aliases in the network(s) the container connects to.
-v, --volume=[] Bind mount a volume (default [])
-T Disable pseudo-tty allocation. By default docker-compose run allocates a TTY.
-w, --workdir="" Working directory inside the container
scale -t, --timeout TIMEOUT Specify a shutdown timeout in seconds. (default: 10)
start
stop -t, --timeout TIMEOUT Specify a shutdown timeout in seconds. (default: 10)
top
unpause
up -d, --detach Detached mode: Run containers in the background, print new container names. Incompatible with --abort-on-container-exit.
--no-color Produce monochrome output.
--quiet-pull Pull without printing progress information
--no-deps Don't start linked services.
--force-recreate Recreate containers even if their configuration and image haven't changed.
--always-recreate-deps Recreate dependent containers. Incompatible with --no-recreate.
--no-recreate If containers already exist, don't recreate them. Incompatible with --force-recreate and -V.
--no-build Don't build an image, even if it's missing.
--no-start Don't start the services after creating them.
--build Build images before starting containers.
--abort-on-container-exit Stops all containers if any container was stopped. Incompatible with -d.
-t, --timeout TIMEOUT Use this timeout in seconds for container shutdown when attached or when containers are already running. (default: 10)
-V, --renew-anon-volumes Recreate anonymous volumes instead of retrieving data from the previous containers.
--remove-orphans Remove containers for services not defined in the Compose file.
--exit-code-from SERVICE Return the exit code of the selected service container. Implies --abort-on-container-exit.
--scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the scale setting in the Compose file if present.

@ghost
Copy link
Author

ghost commented Aug 10, 2019

NP, thanks for your work! You stepped in when the Podman people decided to ignore simpler use cases. It should be an official project.

I forgot to add the options for docker-compose --help itself.

Feedback: if you're going to take the project a little more seriously maybe the .MD's could be improved?

  • PodMan should be Podman. Podman-compose could follow Docker's approach: Podman Compose.
  • Add releases? Nothing fancy just tags so people don't need to pin by commit id and your software could be packaged by distros.
  • Mappings: if Docker Compose introduces a -t option for whatever reason, it will lead to a conflict. Rename it? Suffix containing --podman-?? I'm not a native english speaker so I'll avoid giving any recommendations. Since it's a Podman related project we could draw inspiration from https://github.com/containers/libpod/blob/master/docs/podman.1.md and others https://github.com/containers/libpod/tree/master/docs. 1podfw, 1pod, cntnet, publishall is a little cryptic? 2pods1cup?
  • Remove the Note once the code is more mature and tested.

And if you need help with something maybe list everything in an issue and pin it? I can't code but maybe I could help in other ways.

@muayyad-alsadi
Copy link
Collaborator

PodMan should be Podman. Podman-compose could follow Docker's approach: Podman Compose.

valid point

Add releases? Nothing fancy just tags so people don't need to pin by commit id and your software could be packaged by distros.

valid point, but now now, maybe after v1.0. because in that case people will stick to the stable branch and I won't be able to catch a simple typo like this one.

v1.0 is not taking to long, maybe a week from now.

mapping ... 1podfw, 1pod, cntnet, publishall is a little cryptic

end-user should not care about those (leave it to default will just work). those are workarounds started initially because it was impossible to implement podman-compose, I worked with podman to make them possible and at that time we did not know which one of them will work.

unfortunately, this will remain until user-space networking is enhanced (currently we can't run two containers with same ports, ex. a redis and its replica using same port)

thank you for your feedback, keep it coming.
I'll need you to test implementing the missing features during this week.

@ghost
Copy link
Author

ghost commented Aug 10, 2019

end-user should not care about those (leave it to default will just work). those are workarounds started initially because it was impossible to implement podman-compose, I worked with podman to make them possible and at that time we did not know which one of them will work.

Having the options is great, being explicit is always better. I was just nitpicking about their names (e.g. 1podfw) being a little weird, but it's not important!

keep it coming

Maybe having a Shortcomings-like page for Podman Compose. Like what problems are currently present, what can't be fixed because of incompatibilities or lack or daemon. Or they could be listed in a column if you decide to use the "compatibility table".

@muayyad-alsadi
Copy link
Collaborator

I was just nitpicking about their names (e.g. 1podfw)

It means create one pod and do port forwarding in the pod not in containers.

Please read mapping section in readme and feel free to suggest better names.

@ghost
Copy link

ghost commented Aug 24, 2019

Is it ready for production? Must we use development branch?

@muayyad-alsadi
Copy link
Collaborator

Is it ready for production? Must we use development branch?

I've created that branch because I've made drastic changes to how we parse sub-commands arguments, and made the default is attach not detach.

within a single week, I hope we can iron all issues and merge it again.

@nanonyme
Copy link

nanonyme commented Sep 2, 2021

Looks like env-file is missing from run.

abitrolly added a commit to abitrolly/podman-compose that referenced this issue Sep 23, 2021
Of course it would be better to have a proper compatibility page (containers#26)
muayyad-alsadi pushed a commit that referenced this issue Sep 23, 2021
Of course it would be better to have a proper compatibility page (#26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants