Trying to integrate all functions into one container
This commit is contained in:
51
AiO_Container/Dockerfile
Normal file
51
AiO_Container/Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
||||
FROM alpine:latest
|
||||
|
||||
# https://docs.docker.com/reference/dockerfile/#environment-replacement
|
||||
ENV DEBMIRRORURL="https://www.debian.org/mirror/list"
|
||||
|
||||
# By default these are scraped
|
||||
ENV EXTRA_REPOS=False
|
||||
ENV SECURITY_REPOS=True
|
||||
ENV DEBIAN_REPOS=True
|
||||
ENV OPNSENSE_REPOS=True
|
||||
|
||||
RUN apk update && \
|
||||
apk add python3 py3-pip git su-exec curl wget unzip && \
|
||||
mkdir -p /etc/debmirror
|
||||
|
||||
WORKDIR /etc/debmirror/
|
||||
|
||||
# This will be done in Init script based on what ENV's are configured
|
||||
# RUN git clone https://tea.shupogaki.org/YuruC3/Repo-IP-lists && \
|
||||
# ln -s /etc/debmirror/Repo-IP-lists/MirrorListV4 /etc/debmirror/MirrorListV4 && \
|
||||
# ln -s /etc/debmirror/Repo-IP-lists/MirrorListV6 /etc/debmirror/MirrorListV6 && \
|
||||
# ln -s /etc/debmirror/Repo-IP-lists/OPNS_MirrorListV4 /etc/debmirror/OPNS_MirrorListV4 && \
|
||||
# ln -s /etc/debmirror/Repo-IP-lists/OPNS_MirrorListV6 /etc/debmirror/OPNS_MirrorListV6
|
||||
# RUN touch /etc/debmirror/MirrorListV6 && \
|
||||
# touch /etc/debmirror/MirrorListV4
|
||||
|
||||
# Copy code
|
||||
COPY ./code/* /etc/debmirror/
|
||||
|
||||
# Copy important files
|
||||
# COPY ./init.sh /etc/debmirror/
|
||||
|
||||
# Install python modules
|
||||
COPY ./requirements.txt /etc/debmirror/
|
||||
RUN python3 -m venv venv && \
|
||||
venv/bin/python3 -m pip install --upgrade pip && \
|
||||
venv/bin/pip3 install -r requirements.txt
|
||||
|
||||
# Setup cronjobs
|
||||
# COPY cron-jobs /etc/crontabs/
|
||||
# RUN chmod 0644 /etc/crontabs/cron-jobs && \
|
||||
# crontab /etc/crontabs/cron-jobs
|
||||
|
||||
# Copy and configure git copying script
|
||||
COPY ./gitPush.sh /etc/debmirror/
|
||||
RUN chmod +x /etc/debmirror/gitPush.sh
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
||||
# Start cron
|
||||
CMD ["/usr/sbin/crond", "-f"]
|
||||
Reference in New Issue
Block a user