mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-21 19:53:06 +00:00
fix docker build
This commit is contained in:
parent
0619750ffa
commit
c5da3c1f22
2 changed files with 25 additions and 9 deletions
16
Dockerfile
16
Dockerfile
|
@ -71,6 +71,7 @@ ENV CODE_DIR=/app \
|
|||
DATA_DIR=/data \
|
||||
GLOBAL_VENV=/venv \
|
||||
PLAYWRIGHT_BROWSERS_PATH=/browsers
|
||||
# TODO: add TMP_DIR and LIB_DIR?
|
||||
|
||||
# Application-level paths
|
||||
ENV APP_VENV=/app/.venv \
|
||||
|
@ -201,6 +202,21 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
|
|||
&& echo -e '\n\n' \
|
||||
) | tee -a /VERSION.txt
|
||||
|
||||
# Install sonic search
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$TARGETVARIANT \
|
||||
echo "[+] Installing Sonic search binary using apt..." \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/sonic.list \
|
||||
&& curl -fsSL 'https://packagecloud.io/valeriansaliou/sonic/gpgkey' | gpg --dearmor -o /usr/share/keyrings/sonic.gpg \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install -qq -y -t bookworm --no-upgrade sonic \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
# Save version info
|
||||
&& ( \
|
||||
which sonic && sonic --version \
|
||||
&& echo -e '\n\n' \
|
||||
) | tee -a /VERSION.txt
|
||||
COPY --chown=root:root --chmod=755 "etc/sonic.cfg" /etc/sonic.cfg
|
||||
|
||||
# Install chromium browser using playwright
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$TARGETVARIANT --mount=type=cache,target=/root/.cache/pip,sharing=locked,id=pip-$TARGETARCH$TARGETVARIANT --mount=type=cache,target=/root/.cache/ms-playwright,sharing=locked,id=browsers-$TARGETARCH$TARGETVARIANT \
|
||||
echo "[+] Installing Browser binary dependencies to $PLAYWRIGHT_BROWSERS_PATH..." \
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# _ _ _ ____
|
||||
# / \ _ __ ___| |__ (_)_ _____| __ ) _____ __
|
||||
# / _ \ | '__/ __| '_ \| \ \ / / _ \ _ \ / _ \ \/ /
|
||||
# / ___ \| | | (__| | | | |\ V / __/ |_) | (_) > <
|
||||
# /_/ \_\_| \___|_| |_|_| \_/ \___|____/ \___/_/\_\
|
||||
|
||||
|
||||
"""This is the main entry point for the ArchiveBox CLI."""
|
||||
__package__ = 'archivebox'
|
||||
|
||||
import archivebox # noqa
|
||||
import archivebox # noqa # import archivebox/__init__.py to apply monkey patches, load vendored libs, etc.
|
||||
import sys
|
||||
|
||||
from .cli import main
|
||||
|
||||
ASCII_LOGO_MINI = r"""
|
||||
_ _ _ ____
|
||||
/ \ _ __ ___| |__ (_)_ _____| __ ) _____ __
|
||||
/ _ \ | '__/ __| '_ \| \ \ / / _ \ _ \ / _ \ \/ /
|
||||
/ ___ \| | | (__| | | | |\ V / __/ |_) | (_) > <
|
||||
/_/ \_\_| \___|_| |_|_| \_/ \___|____/ \___/_/\_\
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(args=sys.argv[1:], stdin=sys.stdin)
|
||||
|
|
Loading…
Reference in a new issue