Skip to content

Commit

Permalink
Add centos and fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsutaka committed Jan 31, 2021
1 parent 420aef4 commit bc6ad5f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions centos/BUILDX_PLATFORMS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
linux/arm64,linux/amd64,linux/ppc64le
33 changes: 33 additions & 0 deletions centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM centos:8
LABEL maintainer="Mitz Amano <[email protected]>"

ENV DOCKER_USER mitz
#ENV HOST_DOCKER_GROUP_ID 976

RUN dnf upgrade -y \
&& dnf install -y sudo \
&& useradd -m -G wheel "$DOCKER_USER" \
&& echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& touch /home/$DOCKER_USER/.sudo_as_admin_successful \
&& dnf clean all

USER "${DOCKER_USER}"

WORKDIR "/home/${DOCKER_USER}"

RUN sudo dnf install -y man-db bash-completion openssh vim && \
sudo dnf clean all

# Install docker
#RUN sudo apt-get update && \
# sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common lsb-release && \
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
# sudo apt-key fingerprint 0EBFCD88 && \
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \
# sudo apt-get update && \
# sudo apt-get install -y docker-ce docker-ce-cli containerd.io && \
# sudo rm -rf /var/lib/apt/lists/* && \
# sudo systemctl disable docker.service && \
# sudo usermod -a -G docker mitz && \
# sudo groupmod -g ${HOST_DOCKER_GROUP_ID} docker
#
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ services:
build:
context: ubuntu
image: devel:ubuntu
centos:
build:
context: centos
image: devel:centos
fedora:
build:
context: fedora
image: devel:fedora
1 change: 1 addition & 0 deletions fedora/BUILDX_PLATFORMS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
linux/arm64,linux/amd64,linux/ppc64le
15 changes: 15 additions & 0 deletions fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM fedora:rawhide
ENV container docker
RUN dnf -y update; dnf clean all
RUN dnf -y install systemd; dnf clean all; \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done);\
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ “/sys/fs/cgroup” ]
#CMD [“/usr/sbin/init”]
ENTRYPOINT ["/lib/systemd/systemd"]

0 comments on commit bc6ad5f

Please sign in to comment.