FROM openeuler/openeuler:24.03-lts
RUN yum update -y && \
yum install -y wget unzip shadow && \
yum clean all && \
rm -rf /var/cache/yum && \
rm -rf /tmp/*
RUN useradd -d /home/hwMindX -u 9000 -m -s /usr/sbin/nologin hwMindX && \
usermod root -s /usr/sbin/nologin
COPY ./infer-operator /usr/local/bin/
COPY ./agreement.txt /usr/local/
RUN chown -R hwMindX:hwMindX /usr/local/bin/infer-operator /usr/local/agreement.txt &&\
chmod 500 /usr/local/bin/infer-operator &&\
chmod 440 /usr/local/agreement.txt &&\
chmod 750 /home/hwMindX &&\
echo 'umask 027' >> /etc/profile && \
echo 'source /etc/profile' >> /home/hwMindX/.bashrc
USER hwMindX
ENTRYPOINT ["/bin/bash", "-c", "cat /usr/local/agreement.txt; exec /bin/bash"]