2024-08-04 16:18:06 +08:00
|
|
|
FROM tgagor/centos-stream:latest
|
2022-11-02 07:38:46 +08:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
|
2021-06-01 04:31:00 +08:00
|
|
|
|
2022-10-24 02:30:26 +08: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-06-01 04:31:00 +08: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 16:18:06 +08:00
|
|
|
cargo \
|
2021-06-01 04:31:00 +08:00
|
|
|
cmake \
|
|
|
|
diffutils \
|
|
|
|
gcc-c++ \
|
|
|
|
git \
|
|
|
|
ninja-build \
|
|
|
|
python3 \
|
2024-08-04 16:18:06 +08:00
|
|
|
python3-pexpect \
|
2021-06-01 04:31:00 +08:00
|
|
|
openssl \
|
2022-10-24 02:30:26 +08:00
|
|
|
pcre2-devel \
|
2024-08-04 16:18:06 +08:00
|
|
|
rustc \
|
2022-10-24 02:30:26 +08:00
|
|
|
sudo \
|
2024-08-04 16:18:06 +08:00
|
|
|
tmux \
|
2022-10-24 02:30:26 +08:00
|
|
|
&& yum clean all
|
2021-06-01 04:31:00 +08: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
|