2020-12-20 07:16:41 +08:00
|
|
|
FROM centos:7
|
2022-11-02 07:38:46 +08:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
|
2020-12-20 07:16:41 +08:00
|
|
|
|
|
|
|
# install epel first to get cmake3
|
|
|
|
RUN yum install --assumeyes epel-release https://repo.ius.io/ius-release-el7.rpm \
|
|
|
|
&& yum install --assumeyes \
|
|
|
|
cmake3 \
|
|
|
|
gcc-c++ \
|
2022-08-22 06:46:09 +08:00
|
|
|
git236 \
|
2020-12-20 07:16:41 +08:00
|
|
|
ncurses-devel \
|
|
|
|
ninja-build \
|
2021-01-19 07:51:03 +08:00
|
|
|
python3 \
|
|
|
|
openssl \
|
2022-10-24 02:30:26 +08:00
|
|
|
pcre2-devel \
|
|
|
|
sudo \
|
|
|
|
&& yum clean all
|
2020-12-20 07:16:41 +08:00
|
|
|
|
|
|
|
# cmake is called "cmake3" on centos7.
|
|
|
|
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake \
|
|
|
|
&& pip3 install pexpect
|
|
|
|
|
|
|
|
RUN groupadd -g 1000 fishuser \
|
2021-01-19 07:36:55 +08:00
|
|
|
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser -G wheel \
|
2020-12-20 07:16:41 +08:00
|
|
|
&& 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
|