Skip to content

Commit

Permalink
support amazon linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pyama committed Mar 28, 2024
1 parent b0a0029 commit e127483
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ubuntu:22.04

RUN apt-get update \
&& apt-get install -y init systemd curl sudo vim
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ deploy: pkg yumrepo debrepo
scp assets/GPG-KEY-stns $(SSH):$(RELEASE_DIR)/gpg/
scp assets/scripts/yum-repo.sh $(SSH):$(RELEASE_DIR)/scripts/
scp assets/scripts/apt-repo.sh $(SSH):$(RELEASE_DIR)/scripts/

run_docker:
docker build -t stns-build .
docker rm -f stns-build || true
docker run --name stns-build -d --privileged -t stns-build /sbin/init
docker exec -it stns-build /bin/bash
3 changes: 3 additions & 0 deletions assets/scripts/yum-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ sudo sh <<'SCRIPT'
if [ -f /etc/centos-release ]; then
os_name="centos"
releasever=$(rpm -q --qf "%{version}" -f /etc/centos-release| cut -d. -f1)
elif [ -f /etc/os-release ]; then
os_name="centos"
releasever=$(rpm -q --qf "%{version}" -f /etc/os-release| cut -d. -f1)
elif [ -f /etc/almalinux-release ]; then
os_name="almalinux"
releasever=$(rpm -q --qf "%{version}" -f /etc/almalinux-release| cut -d. -f1)
Expand Down

0 comments on commit e127483

Please sign in to comment.