diff --git a/.drone.yml b/.drone.yml index 8d0e2ab..6f336b2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,9 @@ --- kind: pipeline name: default +platform: + os: linux + arch: amd64 steps: - name: docker image: plugins/docker @@ -16,3 +19,6 @@ steps: auto_tag: false tags: - latest + platforms: + - linux/amd64 + - linux/arm64 diff --git a/README.md b/README.md index f26852f..d586a9e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ A Dockerfile for the [Archive Team Warrior](https://wiki.archiveteam.org/index.php?title=ArchiveTeam_Warrior) +The official image supports both **amd64** and **arm64** architectures (including Raspberry Pi 4/5 and Apple Silicon). Docker will automatically pull the correct image for your platform. ARM32 (armv7/armhf) is not supported. + Build, run, grab the container IP and access the web interface on port 8001. ## Getting Started @@ -118,17 +120,10 @@ kubectl apply -n archive -f k8s-warrior.yml If everything works out you should be able to connect to any of your k8s' nodes IP on port 30163 to view. -You can build the image on other platforms by using [`docker buildx`](https://github.com/docker/buildx), e.g.: - -```bash -docker buildx build -t /archive-team-warrior:latest --platform linux/arm/v7 --push . -``` - ### Docker Compose First edit the `docker-compose.yml` file with any configuration keys (as described above). When configured to your liking, use `docker compose` to start both Warrior and Watchtower. ```bash -cd examples docker compose up -d ``` diff --git a/outdated/Dockerfile.raspberry b/outdated/Dockerfile.raspberry deleted file mode 100644 index 51acdbf..0000000 --- a/outdated/Dockerfile.raspberry +++ /dev/null @@ -1,100 +0,0 @@ -# OUTDATED - -# Dockerfile for Raspberry Pi 2 and 3 -FROM arm32v5/debian:sid-slim -LABEL version="1.0.0" \ - description="ArchiveTeam Warrior container for Raspberry Pi arm32" - -# Install dependencies -RUN apt-get update -RUN apt-get install -y --no-install-recommends \ - curl \ - git \ - net-tools \ - libgnutls30 \ - liblua5.1-0 \ - python \ - python-pip \ - python-setuptools \ - python-wheel \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-wheel \ - sudo \ - wget \ - rsync \ - && useradd -d /home/warrior -m -U warrior --uid 1000 \ - && echo "warrior ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ - && mkdir -p /data/data \ - && chown -R warrior:warrior /data/data - -RUN apt-get install -y --no-install-recommends \ - autoconf \ - build-essential \ - flex \ - libgnutls28-dev \ - libidn2-0-dev \ - uuid-dev \ - libpsl-dev \ - libpcre2-dev \ - liblua5.1-0-dev \ - zlib1g-dev - -WORKDIR /tmp -RUN curl -o wget-1.14.lua.LATEST.tar.bz2 \ - https://warriorhq.archiveteam.org/downloads/wget-lua/wget-1.14.lua.LATEST.tar.bz2 \ - && tar -jxf /tmp/wget-1.14.lua.LATEST.tar.bz2 \ - --strip-components=1 - -RUN ./configure --with-ssl=gnutls --disable-nls \ - && make \ - && cp src/wget /usr/bin/wget-lua \ - && chmod a+x /usr/bin/wget-lua - -RUN apt-get remove -y --purge \ - autoconf \ - curl \ - build-essential \ - flex \ - libgnutls28-dev \ - libidn2-0-dev \ - uuid-dev \ - libpsl-dev \ - libpcre2-dev \ - liblua5.1-0-dev \ - zlib1g-dev \ - && apt-get clean -y \ - && apt-get autoremove -y --purge \ - && rm -r /var/lib/apt/lists/* \ - && rm -r /tmp/* - -RUN pip install requests \ - && pip install six \ - && pip install warc \ - && pip3 install requests \ - && pip3 install six \ - && pip3 install warc - -RUN pip3 install seesaw - -WORKDIR /home/warrior -USER 1000 -RUN mkdir /home/warrior/projects - -# Expose the persistent data to the host. This will allow the user -# to not have to reconfigure the container across runs. -VOLUME /data/data -VOLUME /home/warrior/projects/config.json - -# Expose web interface port -EXPOSE 8001 - -ENTRYPOINT ["run-warrior3", \ - "--projects-dir", "/home/warrior/projects", \ - "--data-dir", "/data/data", \ - "--warrior-hq", "http://warriorhq.archiveteam.org", \ - "--port", "8001", \ - "--real-shutdown"] - -HEALTHCHECK --interval=5s --timeout=3s CMD /home/warrior/data/wget-at -nv -t1 'http://localhost:8001/index.html' -O /dev/null || exit 1 \ No newline at end of file diff --git a/outdated/Dockerfile.raspberry-k8s b/outdated/Dockerfile.raspberry-k8s deleted file mode 100644 index bb680f6..0000000 --- a/outdated/Dockerfile.raspberry-k8s +++ /dev/null @@ -1,91 +0,0 @@ -# OUTDATED - -# Dockerfile for k8s on Raspberry Pis -FROM arm32v5/debian:sid-slim -LABEL version="1.0.0" \ - description="ArchiveTeam Warrior container for k8s on Raspberry Pis" - -# Install dependencies -RUN apt-get update -RUN apt-get install -y --no-install-recommends \ - curl \ - git \ - net-tools \ - libgnutls30 \ - liblua5.1-0 \ - python \ - python-pip \ - python-setuptools \ - python-wheel \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-wheel \ - sudo \ - wget \ - rsync \ - && useradd -d /home/warrior -m -U warrior --uid 1000 \ - && echo "warrior ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ - && mkdir -p /data/data \ - && chown -R warrior:warrior /data/data - -RUN apt-get install -y --no-install-recommends \ - autoconf \ - build-essential \ - flex \ - libgnutls28-dev \ - libidn2-0-dev \ - uuid-dev \ - libpsl-dev \ - libpcre2-dev \ - liblua5.1-0-dev \ - zlib1g-dev - -WORKDIR /tmp -RUN curl -o wget-1.14.lua.LATEST.tar.bz2 \ - https://warriorhq.archiveteam.org/downloads/wget-lua/wget-1.14.lua.LATEST.tar.bz2 \ - && tar -jxf /tmp/wget-1.14.lua.LATEST.tar.bz2 \ - --strip-components=1 - -RUN ./configure --with-ssl=gnutls --disable-nls \ - && make \ - && cp src/wget /usr/bin/wget-lua \ - && chmod a+x /usr/bin/wget-lua - -RUN apt-get remove -y --purge \ - autoconf \ - curl \ - build-essential \ - flex \ - libgnutls28-dev \ - libidn2-0-dev \ - uuid-dev \ - libpsl-dev \ - libpcre2-dev \ - liblua5.1-0-dev \ - zlib1g-dev \ - && apt-get clean -y \ - && apt-get autoremove -y --purge \ - && rm -r /var/lib/apt/lists/* \ - && rm -r /tmp/* - -RUN pip install requests \ - && pip install six \ - && pip install warc \ - && pip3 install requests \ - && pip3 install six \ - && pip3 install warc - -RUN pip3 install seesaw - -WORKDIR /home/warrior -USER 1000 - -ENTRYPOINT ["run-warrior3", \ - "--projects-dir", "/home/warrior/projects", \ - "--data-dir", "/home/warrior/assets", \ - "--warrior-hq", "http://warriorhq.archiveteam.org", \ - "--port", "8001", \ - "--real-shutdown"] - -HEALTHCHECK --interval=5s --timeout=3s CMD /home/warrior/data/wget-at -nv -t1 'http://localhost:8001/index.html' -O /dev/null || exit 1 \ No newline at end of file diff --git a/outdated/README.md b/outdated/README.md deleted file mode 100644 index 838c313..0000000 --- a/outdated/README.md +++ /dev/null @@ -1,33 +0,0 @@ -The following was taken out of the repository README due to the Raspberry Dockerfiles being outdated. This could be moved back when Raspberry Dockerfiles are up to date. - -## Alternative Platforms - -### Raspberry Pi - -You can build the container with the following command: - -```bash -docker build --rm -t warrior-arm32v5:latest -f Dockerfile.raspberry . -``` - -The image needs a place to store the downloaded data as well as its -configuration. Say you have a location suitable at /var/local/warrior -use the command below, otherwise update the data and config.json paths. - -First, create an empty config.json if it doesn't exist. Otherwise when you -mount the path with docker it will create it as a directory. - -```bash -touch /var/local/warrior/config.json -``` - -Now start the container. - -```bash -docker run \ - --volume /var/local/warrior/data:/data/data \ - --volume /var/local/warrior/config.json:/home/warrior/projects/config.json \ - --publish 8001:8001 \ - --restart unless-stopped \ - warrior-arm32v5:latest -``` diff --git a/wget-lua.raspberry b/wget-lua.raspberry deleted file mode 100755 index 188d68d..0000000 Binary files a/wget-lua.raspberry and /dev/null differ