feat: add guest artifact packaging for bare-metal smoke

This commit is contained in:
Harivansh Rathi 2026-04-08 13:42:57 -04:00
parent 27f7b6318b
commit 1e55cb4e81

View file

@ -3,6 +3,7 @@ FROM public.ecr.aws/docker/library/ubuntu:24.04
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ARG MICROAGENT_TEST_AUTHORIZED_KEY=""
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
@ -37,7 +38,8 @@ RUN useradd --create-home --shell /bin/bash node \
&& chown -R node:node /home/node \
&& usermod -aG sudo node \
&& printf 'node ALL=(ALL) NOPASSWD:ALL\n' >/etc/sudoers.d/node \
&& chmod 440 /etc/sudoers.d/node
&& chmod 440 /etc/sudoers.d/node \
&& install -d -m 0755 /etc/microagent
COPY docker/guest/sshd_config /etc/ssh/sshd_config
COPY docker/guest/microagent-init.sh /usr/local/bin/microagent-init
@ -53,10 +55,16 @@ RUN chmod 755 /usr/local/bin/microagent-init /usr/local/bin/microagent-desktop-s
&& chown node:node /home/node/.zshrc /home/node/.bashrc /home/node/.profile \
&& usermod -s /usr/bin/zsh node \
&& install -d /opt/zsh/pure \
&& ln -sf /usr/local/bin/microagent-init /sbin/init \
&& curl -fsSL https://raw.githubusercontent.com/sindresorhus/pure/v1.27.0/pure.zsh -o /opt/zsh/pure/pure.zsh \
&& curl -fsSL https://raw.githubusercontent.com/sindresorhus/pure/v1.27.0/async.zsh -o /opt/zsh/pure/async.zsh \
&& tic -x -o /usr/share/terminfo /tmp/xterm-ghostty.terminfo \
&& tic -x -o /usr/share/terminfo /tmp/xterm-kitty.terminfo \
&& rm -f /tmp/xterm-ghostty.terminfo /tmp/xterm-kitty.terminfo
RUN if [ -n "$MICROAGENT_TEST_AUTHORIZED_KEY" ]; then \
printf '%s\n' "$MICROAGENT_TEST_AUTHORIZED_KEY" >/etc/microagent/authorized_keys; \
chmod 600 /etc/microagent/authorized_keys; \
fi
CMD ["/usr/local/bin/microagent-init"]