forked from mgoltzsche/podman-static
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5706153
commit 2f76d3d
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ARG BASEIMAGE | ||
FROM ${BASEIMAGE} | ||
RUN apk add --no-cache curl docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
echo | ||
echo TEST DOCKER-COMPOSE IN PODMAN | ||
echo | ||
|
||
set -eu | ||
|
||
cat <<EOF > /tmp/docker-compose.yml | ||
version: "3" | ||
services: | ||
reverse-proxy: | ||
image: traefik:v2.4 | ||
command: --api.insecure=true --providers.docker | ||
ports: | ||
- "80:80" | ||
- "8080:8080" | ||
volumes: | ||
- /tmp/podman.sock:/var/run/docker.sock | ||
whoami: | ||
image: traefik/whoami | ||
labels: | ||
- "traefik.http.routers.whoami.rule=Host(\`whoami.docker.localhost\`)" | ||
- "traefik.http.services.whoami.loadbalancer.server.port=80" | ||
EOF | ||
|
||
podman system service --time 0 unix:///tmp/podman.sock & | ||
sleep 5 | ||
docker-compose -H unix:///tmp/podman.sock -f /tmp/docker-compose.yml up -d | ||
sleep 5 | ||
curl -H "Host:whoami.docker.localhost" http://127.0.0.1 |