-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (36 loc) · 1.34 KB
/
podman.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
name: Podman
on:
push:
pull_request:
jobs:
podman:
runs-on: ubuntu-latest
steps:
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Try manually pulling podman image
run: |
getent passwd runner
getent passwd root
echo "USER: `whoami`"
sudo ls -l /var/lib/containers
cat <<EOF > Containerfile
FROM registry.access.redhat.com/ubi8/ubi-init
RUN yum -y install httpd; yum clean all; systemctl enable httpd;
RUN echo "Successful Web Server Test" > /var/www/html/index.html
RUN mkdir /etc/systemd/system/httpd.service.d/; echo -e '[Service]\nRestart=always' > /etc/systemd/system/httpd.service.d/httpd.conf
EXPOSE 80
CMD [ "/sbin/init" ]
EOF
podman build --format=docker -t podmantest .
podman run -d -p 8080:80 podmantest /sbin/init
podman ps --all
/usr/bin/podman pull ghcr.io/utrechtuniversity/src-test-workspace:ubuntu_focal
/usr/bin/podman run -d --hostname src-test --name src-test ghcr.io/utrechtuniversity/src-test-workspace:ubuntu_focal /sbin/init
sleep 5
/usr/bin/podman ps --all