-
Notifications
You must be signed in to change notification settings - Fork 0
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
161320b
commit 52eebdd
Showing
6 changed files
with
39 additions
and
31 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
topic1 | ||
topic2 | ||
topic3 | ||
topic4 | ||
topic5 | ||
|
||
[options] | ||
default-branch = main | ||
|
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,41 +1,38 @@ | ||
FROM python:3.9-slim-buster | ||
FROM python:3.9.13-alpine3.16 AS base | ||
|
||
LABEL org.opencontainers.image.title="Repo Keeper" \ | ||
LABEL org.opencontainers.image.title="Keypr" \ | ||
org.opencontainers.image.description="Configuration Keeper for GitHub Repositories." \ | ||
org.opencontainers.image.url="https://github.com/OLeonardoRodrigues/repo-keeper/blob/main/README.md" \ | ||
org.opencontainers.image.documentation="https://github.com/OLeonardoRodrigues/repo-keeper/wiki" \ | ||
org.opencontainers.image.source="https://github.com/OLeonardoRodrigues/repo-keeper" \ | ||
org.opencontainers.image.licenses="GPL-3.0-only" \ | ||
org.opencontainers.image.vendor="Leonardo Rodrigues de Oliveira - OLeonardoRodrigues" \ | ||
org.opencontainers.image.base.name="registry.hub.docker.com/python/python:3.9-slim-buster" \ | ||
org.opencontainers.image.base.digest="sha256:a32a3204b2b44f3e7e699e5b4af1a5784b6a9b8a4f4446dbb8a3aa65375a8d7d" | ||
org.opencontainers.image.url="https://github.com/fr-platform/keypr/blob/main/README.md" \ | ||
org.opencontainers.image.documentation="https://github.com/fr-platform/keypr/wiki" \ | ||
org.opencontainers.image.source="https://github.com/fr-platform/keypr" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.vendor="Fr Platform" \ | ||
org.opencontainers.image.base.name="registry.hub.docker.com/python/python:3.9.13-alpine3.16" | ||
|
||
WORKDIR /app | ||
|
||
ENV PYTHONPATH /app | ||
|
||
ENV GH_CONFIG_DIR /app/gh_config | ||
|
||
RUN useradd -m python | ||
|
||
RUN mkdir /app/gh_config \ | ||
&& chown -R python:python /app/gh_config \ | ||
&& chmod +w /app/gh_config | ||
RUN addgroup -S python \ | ||
&& adduser -S python -G python \ | ||
&& apk update \ | ||
&& apk add --no-cache --virtual .build-deps curl \ | ||
&& apk add --no-cache git github-cli \ | ||
&& apk del --purge .build-deps \ | ||
&& mkdir --mode=777 /app/gh_config \ | ||
&& chown --recursive python:python /app/gh_config | ||
|
||
COPY --chown=python:python requirements.txt ./ | ||
|
||
RUN pip3 install -r requirements.txt | ||
RUN pip install --no-cache-dir --no-color --no-python-version-warning --disable-pip-version-check --requirement requirements.txt \ | ||
&& rm -f requirement.txt | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install curl -y \ | ||
&& apt-get install git -y \ | ||
&& curl -L https://github.com/cli/cli/releases/download/v2.7.0/gh_2.7.0_linux_amd64.deb \ | ||
> gh_2.7.0_linux_amd64.deb \ | ||
&& dpkg -i ./gh_2.7.0_linux_amd64.deb | ||
FROM base AS deploy | ||
|
||
COPY --chown=python:python src repo_keeper | ||
COPY --chown=python:python src keypr | ||
|
||
USER python | ||
|
||
CMD [ "python3.9", "-m" , "repo_keeper"] | ||
CMD [ "python", "-m" , "keypr"] |
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
sudo docker rmi --force keypr:local | ||
|
||
sudo docker container prune --force | ||
|
||
sudo docker build . --tag keypr:local --no-cache --progress plain | ||
|
||
sudo docker run --detach --name keypr keypr:local | ||
|
||
sudo docker images --all --format '{{.Size}}' keypr:local |
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
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