diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..6279db6 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,26 @@ +--- +name: Pull Request Tests + +'on': + pull_request: + branches: + - main + - master + push: + branches: + - main + - master + +jobs: + hadolint: + name: Lint Dockerfile + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Run hadolint + uses: hadolint/hadolint-action@v3.3.0 + with: + dockerfile: Dockerfile + failure-threshold: warning diff --git a/Dockerfile b/Dockerfile index a68acbc..d9bec4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -FROM centos:7 +FROM almalinux:10 -RUN yum -y install http://yum.puppet.com/puppet6/puppet6-release-el-7.noarch.rpm && \ - yum -y install puppet-agent && \ - yum clean all +# hadolint ignore=DL3041 +RUN dnf -y install "https://yum.voxpupuli.org/openvox8-release-el-$(rpm -E %rhel).noarch.rpm" && \ + dnf -y install openvox-agent && \ + dnf clean all diff --git a/README.md b/README.md index 883e61b..f0572f5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,33 @@ # docker-sandbox -This repo contains a Docker configuration for a basic CentOS 7 + Puppet AIO system +This repo contains a Docker configuration for a basic AlmaLinux + OpenVox system suitable for demonstration purposes. To use it, run the following: - docker run --rm -it puppetbootstrap/sandbox /bin/bash +```shell +docker run --rm -it ghcr.io/puppet-bootstrap/sandbox:latest +``` + +You can also use `podman`: + +```shell +podman run --rm -it ghcr.io/puppet-bootstrap/sandbox:latest +``` + +Inside the container, all `puppet` commands will work as expected, but you can safely +make changes in the ephemeral storage without it affecting your system. + +``` +$ podman run --rm -it ghcr.io/puppet-bootstrap/sandbox:latest +[root@e43c4102b9e5 /]# puppet resource file /tmp/test_file ensure=file +Notice: /File[/tmp/test_file]/ensure: created +file { '/tmp/test_file': + ensure => 'file', + provider => 'posix', +} +[root@e43c4102b9e5 /]# ls -l /tmp/test_file +-rw-r--r-- 1 root root 0 Oct 23 20:55 /tmp/test_file +[root@e43c4102b9e5 /]# exit +exit +$ ls -l /tmp/test_file +ls: cannot access '/tmp/test_file': No such file or directory +```