| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.ref.name=ubuntu |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:ddf1aa62235de6657123492b19d27d937c25668011b5ebf923a3f019200f8540 in / |
| CMD ["/bin/bash"] |
| ARG ARG_UID=1000 |
| ARG ARG_GID=1000 |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/sh -c echo "Preparing build of AnythingLLM image for non-ARM architecture" # buildkit |
| SHELL [/bin/bash -o pipefail -c] |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/bash -o pipefail -c DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends curl gnupg libgfortran5 libgbm1 tzdata netcat-openbsd libasound2t64 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator3-1 libnss3 lsb-release xdg-utils git build-essential ffmpeg && mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install -yq --no-install-recommends nodejs && curl -LO https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn_1.22.19_all.deb && dpkg -i yarn_1.22.19_all.deb && rm yarn_1.22.19_all.deb && curl -LsSf https://astral.sh/uv/0.6.10/install.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv && mv /root/.local/bin/uvx /usr/local/bin/uvx && echo "Installed uvx! $(uv --version)" && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/bash -o pipefail -c (getent passwd "$ARG_UID" && userdel -f "$(getent passwd "$ARG_UID" | cut -d: -f1)") || true && (getent group "$ARG_GID" && groupdel "$(getent group "$ARG_GID" | cut -d: -f1)") || true && groupadd -g "$ARG_GID" anythingllm && useradd -l -u "$ARG_UID" -m -d /app -s /bin/bash -g anythingllm anythingllm && mkdir -p /app/frontend/ /app/server/ /app/collector/ && chown -R anythingllm:anythingllm /app # buildkit |
| COPY ./docker/docker-entrypoint.sh /usr/local/bin/ # buildkit |
| COPY ./docker/docker-healthcheck.sh /usr/local/bin/ # buildkit |
| COPY --chown=anythingllm:anythingllm ./docker/.env.example /app/server/.env # buildkit |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/bash -o pipefail -c chmod +x /usr/local/bin/docker-entrypoint.sh && chmod +x /usr/local/bin/docker-healthcheck.sh # buildkit |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/bash -o pipefail -c echo "Running common build flow of AnythingLLM image for all architectures" # buildkit |
| USER anythingllm |
| WORKDIR /app |
| COPY --chown=anythingllm:anythingllm ./server /app/server/ # buildkit |
| WORKDIR /app/server |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/bash -o pipefail -c yarn install --production --network-timeout 100000 && yarn cache clean # buildkit |
| WORKDIR /app |
| COPY --chown=anythingllm:anythingllm ./collector/ ./collector/ # buildkit |
| WORKDIR /app/collector |
| ENV PUPPETEER_DOWNLOAD_BASE_URL=https://storage.googleapis.com/chrome-for-testing-public |
| RUN |2 ARG_UID=1000 ARG_GID=1000 /bin/bash -o pipefail -c yarn install --production --network-timeout 100000 && yarn cache clean # buildkit |
| WORKDIR /app |
| USER anythingllm |
| WORKDIR /app |
| COPY --chown=anythingllm:anythingllm /app/frontend/dist /app/server/public # buildkit |
| ENV NODE_ENV=production |
| ENV ANYTHING_LLM_RUNTIME=docker |
| ENV DEPLOYMENT_VERSION=1.9.1 |
| HEALTHCHECK &{["CMD-SHELL" "/bin/bash /usr/local/bin/docker-healthcheck.sh || exit 1"] "1m0s" "10s" "1m0s" "0s" '\x00'} |
| ENTRYPOINT ["/bin/bash" "/usr/local/bin/docker-entrypoint.sh"] |