podman-compose | a script to run docker-compose.yml using podman | Continuous Deployment library
kandi X-RAY | podman-compose Summary
kandi X-RAY | podman-compose Summary
An implementation of Compose Spec with Podman backend. This project focus on:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Builds a pod
- Log messages to stderr
- Return the output of a podman command
- Get podman arguments
- Run the pod
- Parse the compose file
- Parse command line arguments
- Return a dictionary of values from a file
- Runs compose command
- List all volumes
- Return a list of volume names
- Wait for containers to finish
- Execute a pod command
- Pull docker images
- Check if Docker container is local
- Build containers
- Build one image
- Start a running container
- Assert that the given services are present
- Execute a podman command
- Compute the publish port
- Compose pod logs
- Run a podman command
- Creates the system
- Compare two strings
podman-compose Key Features
podman-compose Examples and Code Snippets
sudo systcl -w net.ipv4.ip_unprivileged_port_start=0
version: "3"
services:
blog:
image: ghost
environment:
url: http://blog.site.localhost
# the pathwae method!
proxy:
image: quay.io/pathwae/proxy
environment:
CON
version: '3.1'
services:
humhub:
image: mriedmann/humhub:1.6.2
links:
- "db:db"
ports:
- "8080:80"
volumes:
- "config:/var/www/localhost/htdocs/protected/config"
- "uploads:/var/www/localhost/htdocs/uploads"
make run
make run CACHITO_COMPOSE_ENGINE=podman-compose-auto
# List all requests
curl http://localhost:8080/api/v1/requests
# Create a new request
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/requests -d \
'{
Community Discussions
Trending Discussions on podman-compose
QUESTION
I am deploying several Pods using podman-compose. To do so, each pod has its own definition in a podman-compose.yaml file that I execute in rootless mode (so all containers in a Pod coexist in the same host/IP). However, I would like to make able a container in a Pod to reach a service exposed by a container in another pod.
I know Kubernetes has the Service object that let pods communicate between them. But I don't want to use K8S...
So my question is: Is there any 'equivalent' or workaround I could use to reach such a communication between pods? Not only in the Podman ecosystem, but in the Linux's one.
Ideally, I would like to use a DNS that lets containers resolve the IP of other containers in other pods. Should I use my machine (where all pods are running) DNS to proxy requests between pods? And more importantly, is this a good practice?
Sorry if the answer is pretty obvios, I am new in the IT world.
Anyway, thank you all in advance!
...ANSWER
Answered 2022-Feb-19 at 13:09So my question is: Is there any 'equivalent' or workaround I could use to reach such a communication between pods? Not only in the Podman ecosystem, but in the Linux's one.
There is no analog to a Kubernetes Service
object. In podman (and docker), service discovery is name-based: containers can refer to other containers by name, and there are no restrictions on what ports they can access. So if you have:
QUESTION
What I am trying is to create a container isolated otherwise but having a port open for access from outside. I'd like to keep it so that container can't access internet.
I have internal
network and container that has a single port open for accessing the service.
example docker-compose.yml
:
ANSWER
Answered 2022-Mar-07 at 11:38Solution of some sorts was to create a reverse-proxy and attach it to to the internal
and to a driver:bridge
network. Now the traffic to vaultwarden app goes through the other network and vaultwarden itself can't access internet.
QUESTION
I'm planning to move away from Docker to Podman. I use docker-compose a lot so am planning to switch to podman-compose as well.
However I'm stuck at the simplest of podman examples, I can't seem to mount a volume onto my container? Obviously I'm doing something wrong however I cant figure out what it is.
My source file definitely exists on my (hardware) host (so not the podman machine). but I keep getting the error 'no such file or directory'.
Funny thing is if I manually create the same file locally on the podman machine (podman machine ssh --> touch /tmp/test.txt) it works perfectly fine.
Question is;
- should I (manually?) mount all my local files onto the Fedora VM (podman machine) so that in turn this Fedora mount can be used in my actual container? and if so, how do I do this?
- The
podman run
cmd below should work and there is something else I'm doing wrong?
ANSWER
Answered 2021-Dec-20 at 07:31As mentioned by @ErikSjölund there has been an active treat on https://github.com/containers/podman. Apparantely Centos (Podman Machine) does not (yet) support different types of volume creation on the machine.
It's not perse Podman lacking this feature it's waiting for CentOS to support this feature as well.
However, should you want to mount a local directory onto the machine I recommend have a look at https://github.com/containers/podman/issues/8016#issuecomment-995242552. It describes how to do a read-only mount on CoreOS (or break compatibility with local version).
Info:
https://github.com/containers/podman/pull/11454 https://github.com/containers/podman/pull/12584
QUESTION
we basically have a docker-compose.yml file looking like this:
...ANSWER
Answered 2021-Sep-13 at 09:56Upgrading to a newer Podman version did fix the problem. For more details take a look at this Github issue: https://github.com/containers/podman/issues/11457#issuecomment-916260531
QUESTION
I am trying to set up a local dev LEMP stack for a Slim-4 project using podman-compose. So far I have containers for PHP and Nginx. Nginx runs but gives a 500 error on trying to access the log directory - permission denied. This directory is outside of the public directory that is served by nginx.
I have selinux set to permissive to eliminate its issues. I have used podman unshare to set ownership to the container's Nginx UID:GID. I tried the setup with only a simple index file - the file is served with no issues. So, nginx/podman has access to the nginx configuration file on the host. The issue must be with write permissions.
Here is my docker-compose file:
...ANSWER
Answered 2020-Jul-19 at 11:44The issue was that I incorrectly assumed I needed to set permissions to allow Nginx to have access.
Instead I needed to grant the group www-data access permissions.
How I did it:
log into the running Nginx container podman exec -it [container ID] bash
find the www-data GID (Group ID) - from the container command line, cat /etc/passwd | grep www-data
note the GID (in the result you will see something like ...x:33:33...
33:33 is the user:group)
exit the container cli with exit
in your development/host cli, at the root of your project, run podman unshare chown -R 0:[the www-data GID you found above] .
(don't miss the '.')
Explanation:
podman unshare
puts you in a modified userspace that matches the container
chown
changes ownership
-R
means recursive
the number to the left of the ':' is the UID (User ID), the number to the right is the GID
the '.' is the current directory.
I hope this helps someone. I spent hours learning the above.
QUESTION
I'm using multistage build to compile an react app. Primarily I use a base node image, after I use a nginx image to expose to the port 80.
I'm attempting to COPY the build files from builder stage to the /usr/share/nginx/html folder, but gets nothing.
Building the image alone it's working, with docker-compose does nothing.
I attempted to open an issue on the docker repo but is closed, therefore open on the moby engine also is not a option when the podman(that's use moby engine) works well, except the compose that spawn a command as not sudoers and the build fail on the node image download.
...ANSWER
Answered 2020-Jul-12 at 07:36First of all, ensure you have a correct nginx config in the file nginx.conf
. e.g:
QUESTION
I'm evaluating Fedora Silverblue as my main development OS, I'd be using it with other developers that will be using either MacOS or other Linux distributions. I'll need to work with Docker containers.
Fedora comes with Podman as a rootless alternative to manage containers and it's supposed to have exactly the same interface as docker, so alias docker=podman
should work.
I've also installed podman-compose
to have docker-compose
experience, it all works great but I am struggling with the following config to setup ELK stack:
ANSWER
Answered 2020-Jun-20 at 11:42if you run Podman as rootless user then you are not allowed to set the ulimits higher than what your session currently has.
If you need to set a higher ulimit, you either need to allow your user to have it (tweaking /etc/security/limits.conf) or you run the container as root.
QUESTION
Now that RHEL8 is out Docker is no longer a viable option so I'm trying to get a cluster running in Podman, but have run into a permissions error. For whatever reason, no matter what I try, I get java.lang.IllegalStateException: Unable to access 'path.data' (/usr/share/elasticsearch/data)
ANSWER
Answered 2020-May-25 at 20:05This is not a real answer to the question, but if it helps anyone else who encounters this, this is how to install Docker on RHEL-8. You have to force install a more up to date version of containerd. I wasn't able to figure out what was wrong with Podman compose's permissions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install podman-compose
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page