mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-02-06 17:23:28 +08:00
Dockerfile: bump python from 3.7-slim to 3.9-slim
This commit is contained in:
parent
8b10984629
commit
7523de8ee8
@ -1,16 +1,9 @@
|
|||||||
# Use an official Python runtime as a parent image
|
FROM python:3.9-slim
|
||||||
FROM python:3.7-slim
|
|
||||||
|
|
||||||
# Set the working directory to /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy the current directory contents into the container at /app
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
# Install any needed packages specified in requirements.txt
|
|
||||||
RUN pip install --trusted-host pypi.python.org -r /app/requirements.txt
|
RUN pip install --trusted-host pypi.python.org -r /app/requirements.txt
|
||||||
# Define environment variable
|
|
||||||
ENV TOKEN X
|
|
||||||
|
|
||||||
# Run app.py when the container launches
|
|
||||||
CMD ["python", "-u", "SlashBot.py"]
|
CMD ["python", "-u", "SlashBot.py"]
|
@ -13,12 +13,11 @@ escaping = ('\\ ', '\\ ')
|
|||||||
markdownEscape = lambda s: s.replace("_", "\\_").replace("*", "\\*").replace("[", "\\[").replace("`", "\\`")
|
markdownEscape = lambda s: s.replace("_", "\\_").replace("*", "\\*").replace("[", "\\[").replace("`", "\\`")
|
||||||
|
|
||||||
# Docker env
|
# Docker env
|
||||||
if os.environ.get('TOKEN') and os.environ['TOKEN'] != 'X':
|
Token = os.environ.get('TOKEN')
|
||||||
Token = os.environ['TOKEN']
|
if not Token:
|
||||||
else:
|
|
||||||
raise Exception('no token')
|
raise Exception('no token')
|
||||||
|
|
||||||
if os.environ.get('PROXY') and os.environ['PROXY'] != 'X':
|
if os.environ.get('PROXY'):
|
||||||
telegram_proxy = os.environ['PROXY']
|
telegram_proxy = os.environ['PROXY']
|
||||||
requests_proxies = {'all': os.environ['PROXY']}
|
requests_proxies = {'all': os.environ['PROXY']}
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user