Skip to content

Commit

Permalink
add amazonlinux template
Browse files Browse the repository at this point in the history
  • Loading branch information
antmelekhin committed May 28, 2023
1 parent 600feab commit 7b6a7aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: 'rockylinux-9'
dockerfile: 'rockylinux/9.Dockerfile'
tags: 'antmelekhin/docker-systemd:rockylinux-9'
- name: 'amazonlinux-2'
dockerfile: 'amazonlinux/2.Dockerfile'
tags: 'antmelekhin/docker-systemd:amazonlinux-2'

steps:
- name: 'Checkout the codebase'
Expand Down
19 changes: 19 additions & 0 deletions amazonlinux/2.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM amazonlinux:2

ENV container=docker

RUN INSTALL_PKGS='findutils initscripts iproute python3 sudo' \
&& yum makecache && yum install -y $INSTALL_PKGS \
&& yum clean all

RUN find /etc/systemd/system \
/lib/systemd/system \
-path '*.wants/*' \
-not -name '*journald*' \
-not -name '*systemd-tmpfiles*' \
-not -name '*systemd-user-sessions*' \
-print0 | xargs -0 rm -vf

VOLUME [ "/sys/fs/cgroup" ]

ENTRYPOINT [ "/usr/sbin/init" ]

0 comments on commit 7b6a7aa

Please sign in to comment.