-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e463ba
commit 500901e
Showing
1 changed file
with
7 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
FROM python:3.10 | ||
WORKDIR /backup | ||
|
||
ENV ACCESS_TOKEN="" | ||
ENV ORGANIZATION="" | ||
ARG VERSION | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN mkdir /backup/backup && mkdir /backup/metrics \ | ||
&& pip install backup-github-org==${VERSION} | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
apt-get install -y git | ||
CMD ["backup-github", "--help"] | ||
|
||
RUN mkdir "/backup/backup" | ||
RUN mkdir "/backup/metrics" | ||
|
||
RUN pip install backup-github-org==1.0.4 | ||
|
||
ENTRYPOINT backup-github --all -t $ACCESS_TOKEN -o /backup/backup --metrics_path /backup/metrics/${ORGANIZATION}.prom $ORGANIZATION | ||
|
||
# Run command: docker run -rm -v .\backup:/backup/backup -v .\metrics:/backup/metrics -e ACCESS_TOKEN={} -e ORGANIZATION={} | ||
# Build: docker build . -t backup --build-arg VERSION=1.0.4 | ||
# Run: docker run --rm -v .\backup:/backup/backup -v .\metrics:/backup/metrics backup backup-github --all -t "token" -o "/backup/backup" --metrics_path "/backup/metrics/backup.prom" "organization" |