Skip to content

Commit

Permalink
containers/download: Bump base, use new boto3
Browse files Browse the repository at this point in the history
  • Loading branch information
kallisti5 committed Jan 7, 2025
1 parent a2d755f commit 5e07811
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
17 changes: 9 additions & 8 deletions containers/services/download/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
FROM docker.io/alpine:3.15
FROM docker.io/alpine:3.21

MAINTAINER Haiku, Inc. <[email protected]>
LABEL org.opencontainers.image.source https://github.com/haiku/infrastructure
LABEL org.opencontainers.image.url https://github.com/haiku/infrastructure/tree/master/containers/services/download
LABEL org.opencontainers.image.vendor Haiku, Inc.
LABEL org.opencontainers.image.source="https://github.com/haiku/infrastructure"
LABEL org.opencontainers.image.url="https://github.com/haiku/infrastructure/tree/main/containers/services/download"
LABEL org.opencontainers.image.authors="Haiku, Inc."
LABEL org.opencontainers.image.vendor="Haiku, Inc."
LABEL org.opencontainers.image.description="cgit Interface for Haiku"

ADD requirements.txt /
ADD entry.sh /entry.sh

# TODO: Maybe we want this container to pull the generate-download-pages repo at startup instead
# of at build time?
RUN apk add --update python3 python3-dev py-pip git libgcc curl && \
pip install -r /requirements.txt && \
pip install --break-system-packages -r /requirements.txt && \
git clone https://github.com/haiku/generate-download-pages.git /generate-download-pages && \
mkdir /generate-download-pages/output && \
chmod 755 /entry.sh && \
chown -R nobody:nobody /generate-download-pages/output

USER nobody

EXPOSE 8080

CMD ["/entry.sh"]
13 changes: 5 additions & 8 deletions containers/services/download/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
VERSION=20230910
VERSION = $(shell cat VERSION | grep -Ev "^#" | tail -1)-development
REGISTRY = ghcr.io/haiku
default:
docker build --no-cache --tag ${REGISTRY}/download:$(VERSION) .
podman build --no-cache --tag ${REGISTRY}/download:${VERSION} .
test:
docker run -d --name download-test -P ${REGISTRY}/download:$(VERSION)
clean:
docker stop download-test
docker rm download-test
push:
docker push ${REGISTRY}/download:$(VERSION)
docker kill download-test || true
podman run -d --replace --name download-test -v ./config.toml:/config.toml -e CONFIG_PATH=/config.toml -P ${REGISTRY}/download:$(VERSION)
@echo "http://`podman port download-test 8080 | sed 's/0.0.0.0/127.0.0.1/'`"
2 changes: 2 additions & 0 deletions containers/services/download/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ONLY UPDATE ONCE READY TO BUILD NEW RELEASE
20250107
2 changes: 1 addition & 1 deletion containers/services/download/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# packages required for the download generator script
boto
boto3
Mako
toml

0 comments on commit 5e07811

Please sign in to comment.