2024-08-04 08:18:06 +00:00
|
|
|
FROM tgagor/centos-stream:latest
|
2022-11-01 23:38:46 +00:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
|
2021-05-31 20:31:00 +00:00
|
|
|
|
2022-10-23 18:30:26 +00:00
|
|
|
# See https://stackoverflow.com/questions/70963985/error-failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal
|
|
|
|
|
|
|
|
RUN cd /etc/yum.repos.d/ && \
|
|
|
|
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
|
|
|
|
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
|
|
|
|
|
|
|
|
|
2021-05-31 20:31:00 +00:00
|
|
|
# install powertools to get ninja-build
|
|
|
|
RUN dnf -y install dnf-plugins-core \
|
|
|
|
&& dnf config-manager --set-enabled powertools \
|
|
|
|
&& yum install --assumeyes epel-release \
|
|
|
|
&& yum install --assumeyes \
|
2024-08-04 08:18:06 +00:00
|
|
|
cargo \
|
2021-05-31 20:31:00 +00:00
|
|
|
cmake \
|
|
|
|
diffutils \
|
|
|
|
gcc-c++ \
|
|
|
|
git \
|
|
|
|
ninja-build \
|
|
|
|
python3 \
|
2024-08-04 08:18:06 +00:00
|
|
|
python3-pexpect \
|
2021-05-31 20:31:00 +00:00
|
|
|
openssl \
|
2022-10-23 18:30:26 +00:00
|
|
|
pcre2-devel \
|
2024-08-04 08:18:06 +00:00
|
|
|
rustc \
|
2022-10-23 18:30:26 +00:00
|
|
|
sudo \
|
2024-08-04 08:18:06 +00:00
|
|
|
tmux \
|
2022-10-23 18:30:26 +00:00
|
|
|
&& yum clean all
|
2021-05-31 20:31:00 +00:00
|
|
|
|
|
|
|
RUN groupadd -g 1000 fishuser \
|
|
|
|
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser -G wheel \
|
|
|
|
&& mkdir -p /home/fishuser/fish-build \
|
|
|
|
&& mkdir /fish-source \
|
|
|
|
&& chown -R fishuser:fishuser /home/fishuser /fish-source
|
|
|
|
|
|
|
|
USER fishuser
|
|
|
|
WORKDIR /home/fishuser
|
|
|
|
|
|
|
|
COPY fish_run_tests.sh /
|
|
|
|
|
|
|
|
CMD /fish_run_tests.sh
|