Fix image build issues

This commit is contained in:
Andrew Ying 2024-11-18 20:40:07 +00:00
parent b907e3efa9
commit 30efc54858
Signed by: andrew
SSH key fingerprint: SHA256:6goOJXI6ckOipdsJS6oj5gbQYaRmCe37r7bSBnyQLyE

View file

@ -144,7 +144,10 @@ RUN if [[ -f "/etc/fwupd/daemon.conf" ]]; then \
sed -i 's/UpdateMotd=true/UpdateMotd=false/g' /etc/fwupd/daemon.conf; \
fi
RUN echo 'session required pam_limits.so' >> /etc/pam.d/common-session \
RUN echo 'fs.inotify.max_user_watches=655360' >> /etc/sysctl.conf \
&& echo 'fs.inotify.max_user_instances=1280' >> /etc/sysctl.conf \
\
&& echo 'session required pam_limits.so' >> /etc/pam.d/common-session \
&& echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive \
&& echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf \
&& echo 'DefaultLimitSTACK=16M:infinity' >> /etc/systemd/system.conf \
@ -155,16 +158,19 @@ RUN echo 'session required pam_limits.so' >> /etc/pam.d/common-session \
&& echo '* soft stack 16384' >> /etc/security/limits.conf \
&& echo '* hard stack 16384' >> /etc/security/limits.conf
COPY ../helpers/linux-install-tools /tmp/build/
COPY toolchain.json /tmp/build/
RUN set -x \
&& mkdir -p ${AGENT_TOOLSDIRECTORY} \
&& mkdir -p ${AGENT_TOOLSDIRECTORY} \
&& chown -R runner:runner ${AGENT_TOOLSDIRECTORY} \
&& chmod -R 0777 ${AGENT_TOOLSDIRECTORY} \
&& mkdir -p ${AGENT_TOOLSDIRECTORY}
COPY helpers/linux-install-tools /tmp/build/linux-install-tools
COPY ubuntu-22.04/toolchain.json /tmp/build/toolchain.json
RUN set -x \
&& cd /tmp/build \
&& chmod +x linux-install-tools \
&& bash ./linux-install-tools
RUN set -x \
&& chmod -R 0777 /opt \
&& chmod -R 0777 /usr/share
USER runner
WORKDIR /workspace