Skip to content

Commit bc6ad5f

Browse files
committed
Add centos and fedora
1 parent 420aef4 commit bc6ad5f

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

centos/BUILDX_PLATFORMS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
linux/arm64,linux/amd64,linux/ppc64le

centos/Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM centos:8
2+
LABEL maintainer="Mitz Amano <[email protected]>"
3+
4+
ENV DOCKER_USER mitz
5+
#ENV HOST_DOCKER_GROUP_ID 976
6+
7+
RUN dnf upgrade -y \
8+
&& dnf install -y sudo \
9+
&& useradd -m -G wheel "$DOCKER_USER" \
10+
&& echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
11+
&& touch /home/$DOCKER_USER/.sudo_as_admin_successful \
12+
&& dnf clean all
13+
14+
USER "${DOCKER_USER}"
15+
16+
WORKDIR "/home/${DOCKER_USER}"
17+
18+
RUN sudo dnf install -y man-db bash-completion openssh vim && \
19+
sudo dnf clean all
20+
21+
# Install docker
22+
#RUN sudo apt-get update && \
23+
# sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common lsb-release && \
24+
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
25+
# sudo apt-key fingerprint 0EBFCD88 && \
26+
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \
27+
# sudo apt-get update && \
28+
# sudo apt-get install -y docker-ce docker-ce-cli containerd.io && \
29+
# sudo rm -rf /var/lib/apt/lists/* && \
30+
# sudo systemctl disable docker.service && \
31+
# sudo usermod -a -G docker mitz && \
32+
# sudo groupmod -g ${HOST_DOCKER_GROUP_ID} docker
33+
#

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ services:
88
build:
99
context: ubuntu
1010
image: devel:ubuntu
11+
centos:
12+
build:
13+
context: centos
14+
image: devel:centos
15+
fedora:
16+
build:
17+
context: fedora
18+
image: devel:fedora

fedora/BUILDX_PLATFORMS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
linux/arm64,linux/amd64,linux/ppc64le

fedora/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM fedora:rawhide
2+
ENV container docker
3+
RUN dnf -y update; dnf clean all
4+
RUN dnf -y install systemd; dnf clean all; \
5+
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done);\
6+
rm -f /lib/systemd/system/multi-user.target.wants/*;\
7+
rm -f /etc/systemd/system/*.wants/*;\
8+
rm -f /lib/systemd/system/local-fs.target.wants/*; \
9+
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
10+
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
11+
rm -f /lib/systemd/system/basic.target.wants/*; \
12+
rm -f /lib/systemd/system/anaconda.target.wants/*;
13+
VOLUME [ “/sys/fs/cgroup” ]
14+
#CMD [“/usr/sbin/init”]
15+
ENTRYPOINT ["/lib/systemd/systemd"]

0 commit comments

Comments
 (0)