-
Notifications
You must be signed in to change notification settings - Fork 2
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
35b7bca
commit 239ae7c
Showing
4 changed files
with
21 additions
and
54 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,5 +1,3 @@ | ||
pyproject.toml | ||
poetry.lock | ||
README.md | ||
.github/ | ||
.gitignore | ||
|
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 was deleted.
Oops, something went wrong.
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,19 +1,31 @@ | ||
FROM python:3.11.7-slim | ||
FROM python:3.11.7-slim AS base-image | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
|
||
RUN ["pip","install","poetry>=1.7,<1.8","--upgrade"] | ||
|
||
RUN ["poetry","self","add","poetry-plugin-export"] | ||
|
||
WORKDIR /export | ||
|
||
COPY pyproject.toml poetry.lock ./ | ||
|
||
RUN ["poetry","export","--format","requirements.txt","--output","requirements.txt"] | ||
|
||
FROM python:3.11.7-slim AS runtime-image | ||
|
||
LABEL description="CYSCOM VIT's discord bot" | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
COPY --from=base-image /export/requirements.txt requirements.txt | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN ["useradd","--create-home","cyscom-docker"] | ||
|
||
RUN ["pip","install","-r","requirements.txt"] | ||
USER cyscom-docker | ||
|
||
RUN useradd --create-home cyscom-docker | ||
RUN ["pip","install","--requirement","requirements.txt"] | ||
|
||
WORKDIR /home/cyscom-docker/discord-bot | ||
|
||
WORKDIR /discord-bot | ||
|
||
COPY . . | ||
|
||
CMD python3 bot.py |