-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (32 loc) · 914 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# set alpine as the base image of the Dockerfile
FROM python:3.9-slim
WORKDIR /app
# Env var which will be the lower-level user
ENV USER bot
ENV GROUP_NAME group
ENV OWNER [email protected]
ENV SERVER_URL https://localhost
ENV BOT_NAME carl
ENV CLIENT_KEY SECRET_KEY
ENV CLIENT_SECRET SECRET_KEY
ENV ACCESS_TOKEN SECRET_KEY
ENV YT_URL https://www.youtube.com/feeds/videos.xml?channel_id=0000
ENV POD_URL https://localhost
ENV DELAY 10
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Do all of this work as ROOT
USER root
# Create User
RUN adduser ${USER} --system --no-create-home
# update the package repository and install packages
#RUN apk update && apk add py3-pip
# Install Mastodon API
RUN pip3 install Mastodon.py
RUN pip3 install feedparser
# Copy in the startup script & bot script
COPY bot.py .
# Set user during the container runtime
USER ${USER}
# Let's go!
CMD [ "python", "/app/bot.py" ]