main
text 36 lines 1016 Bytes
Raw
1 # Use the pre-built base image for A0
2 # FROM agent-zero-base:local
3 # FROM agent0ai/agent-zero-base:testing
4 FROM agent0ai/agent-zero-base:latest
5
6 # Check if the argument is provided, else throw an error
7 ARG BRANCH
8 RUN if [ -z "$BRANCH" ]; then echo "ERROR: BRANCH is not set!" >&2; exit 1; fi
9 ENV BRANCH=$BRANCH
10
11 # Copy filesystem files to root
12 COPY ./fs/ /
13
14 # pre installation steps
15 RUN bash /ins/pre_install.sh $BRANCH
16
17 # install A0
18 RUN bash /ins/install_A0.sh $BRANCH
19
20 # install additional software
21 RUN bash /ins/install_additional.sh $BRANCH
22
23 # cleanup repo and install A0 without caching, this speeds up builds
24 ARG CACHE_DATE=none
25 RUN echo "cache buster $CACHE_DATE" && bash /ins/install_A02.sh $BRANCH
26
27 # post installation steps
28 RUN bash /ins/post_install.sh $BRANCH
29
30 # Expose ports
31 EXPOSE 22 80 9000-9009
32
33 RUN chmod +x /exe/initialize.sh /exe/run_A0.sh /exe/run_searxng.sh /exe/run_tunnel_api.sh /exe/trigger_self_update.sh
34
35 # initialize runtime and switch to supervisord
36 CMD ["/exe/initialize.sh", "$BRANCH"]