56 lines
1.5 KiB
Docker
56 lines
1.5 KiB
Docker
FROM quay.io/centos/centos:stream8
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
# Add the EPEL repolist
|
|
RUN dnf install --assumeyes epel-release && \
|
|
dnf upgrade --assumeyes --refresh && \
|
|
dnf install --assumeyes \
|
|
bash \
|
|
ca-certificates \
|
|
curl \
|
|
device-mapper-persistent-data \
|
|
dnf-utils \
|
|
gcc \
|
|
gcc-c++ \
|
|
git \
|
|
htop \
|
|
lvm2 \
|
|
make \
|
|
man \
|
|
python3 \
|
|
sudo \
|
|
unzip \
|
|
vim \
|
|
wget \
|
|
rsync && \
|
|
dnf clean all
|
|
|
|
RUN dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \
|
|
dnf install --assumeyes \
|
|
containerd.io \
|
|
docker-ce && \
|
|
systemctl enable docker
|
|
|
|
# Add docker-compose
|
|
RUN curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
RUN chmod +x /usr/local/bin/docker-compose
|
|
|
|
# Make typing unicode characters in the terminal work.
|
|
ENV LANG en_US.UTF-8
|
|
|
|
# Add a user `coder` so that you're not developing as the `root` user
|
|
RUN useradd coder \
|
|
--create-home \
|
|
--shell=/bin/bash \
|
|
--groups=docker \
|
|
--uid=1000 \
|
|
--user-group && \
|
|
echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
|
|
|
|
USER coder
|
|
|
|
# install Homebrew, must be as a non-root user
|
|
RUN HOMEBREW_INSTALL_FROM_API=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
ENV PATH /home/linuxbrew/.linuxbrew/bin:${PATH}
|