archivebox image

main
Ricard Illa 2021-02-23 16:34:34 +01:00
parent 5f280c7042
commit 8cbfc253ab
5 changed files with 79 additions and 2 deletions

View File

@ -1,4 +1,4 @@
images=agate ansible backup buku ddclient git-daemon gitolite gitolite-pystagit rss-bridge sassc syncthing tasks tor vdirsyncer xandikos
images=agate archivebox ansible backup buku ddclient git-daemon gitolite gitolite-pystagit rss-bridge sassc syncthing tasks tor vdirsyncer xandikos
.PHONY: all $(images)
all: $(images)
@ -7,6 +7,9 @@ BUILD = make -C $@
agate:
$(BUILD)
archivebox:
$(BUILD)
ansible:
$(BUILD)

View File

@ -2,7 +2,9 @@
Collection of docker images for my personal use. I usually implement my own
docker images if I don't find one built or recommended by the original
developer of the software I intend to run.
developer of the software I intend to run. Or if the recommended one is too
complex for my specific use case. Or if I don't like it for whatever reason. Or
if I just feel like making my own image.
Simply run `make $IMG_NAME` to build a specific image or run `make` to build them
all.
@ -16,6 +18,7 @@ useful.
(many are self-explanatory)
* agate
* archivebox
* ansible
* backup: simple image used in some of my backup daemons
* buku: buku and bukuserver

56
archivebox/Dockerfile Normal file
View File

@ -0,0 +1,56 @@
FROM alpine:3.13
COPY entrypoint.sh /usr/local/bin/entrypoint
RUN apk add --no-cache --virtual .build-deps \
gcc \
python3-dev \
npm \
musl-dev && \
apk add --no-cache \
py3-pip \
python3 \
curl \
nodejs \
git \
chromium \
youtube-dl \
ripgrep \
wget && \
pip3 install --upgrade pip setuptools && \
pip3 install --upgrade archivebox && \
npm install -g 'git+https://github.com/ArchiveBox/ArchiveBox.git' && \
apk del .build-deps && \
addgroup --gid 10001 archivebox && \
adduser \
--uid 10000 \
--home /var/lib/archivebox \
--ingroup archivebox \
--disabled-password \
--shell /sbin/nologin \
archivebox && \
mkdir -p /data && \
mkdir -p /var/lib/archivebox/chromium_data/Default && \
touch /var/lib/archivebox/cookies.txt && \
chown -R archivebox /data /var/lib/archivebox && \
chmod +x /usr/local/bin/entrypoint
ENV IN_DOCKER=True \
CHROME_SANDBOX=False \
CHROME_BINARY="/usr/bin/chromium-browser" \
CHROME_USER_DATA_DIR="/var/lib/archivebox/chromium_data" \
COOKIES_FILE="/var/lib/archivebox/cookies.txt" \
USE_SINGLEFILE=True \
SINGLEFILE_BINARY="/usr/bin/single-file" \
USE_READABILITY=True \
READABILITY_BINARY="/usr/bin/readability-extractor" \
USE_MERCURY=True \
MERCURY_BINARY="/usr/bin/mercury-parser"
VOLUME /data
EXPOSE 8000
WORKDIR /data
USER archivebox
ENTRYPOINT ["/usr/local/bin/entrypoint"]
CMD ["server", "0.0.0.0:8000"]

10
archivebox/Makefile Normal file
View File

@ -0,0 +1,10 @@
USERNAME = rilla
IMG_NAME = archivebox
.PHONY: build build-nc
build: Dockerfile
docker build -t $(USERNAME)/$(IMG_NAME) .
build-nc: Dockerfile
docker build --no-cache -t $(USERNAME)/$(IMG_NAME) .

5
archivebox/entrypoint.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
archivebox init
exec archivebox "$@"