mirror of
https://github.com/getcompanion-ai/computer-guest.git
synced 2026-04-15 10:05:12 +00:00
feat: add guest artifact packaging for bare-metal smoke
This commit is contained in:
parent
27f7b6318b
commit
1e55cb4e81
1 changed files with 9 additions and 1 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -3,6 +3,7 @@ FROM public.ecr.aws/docker/library/ubuntu:24.04
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG MICROAGENT_TEST_AUTHORIZED_KEY=""
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
|
@ -37,7 +38,8 @@ RUN useradd --create-home --shell /bin/bash node \
|
||||||
&& chown -R node:node /home/node \
|
&& chown -R node:node /home/node \
|
||||||
&& usermod -aG sudo node \
|
&& usermod -aG sudo node \
|
||||||
&& printf 'node ALL=(ALL) NOPASSWD:ALL\n' >/etc/sudoers.d/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/sshd_config /etc/ssh/sshd_config
|
||||||
COPY docker/guest/microagent-init.sh /usr/local/bin/microagent-init
|
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 \
|
&& chown node:node /home/node/.zshrc /home/node/.bashrc /home/node/.profile \
|
||||||
&& usermod -s /usr/bin/zsh node \
|
&& usermod -s /usr/bin/zsh node \
|
||||||
&& install -d /opt/zsh/pure \
|
&& 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/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 \
|
&& 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-ghostty.terminfo \
|
||||||
&& tic -x -o /usr/share/terminfo /tmp/xterm-kitty.terminfo \
|
&& tic -x -o /usr/share/terminfo /tmp/xterm-kitty.terminfo \
|
||||||
&& rm -f /tmp/xterm-ghostty.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"]
|
CMD ["/usr/local/bin/microagent-init"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue