mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2025-03-05 20:51:53 -08:00
Compare commits
1 commit
c83671a023
...
7f97c5e285
Author | SHA1 | Date | |
---|---|---|---|
|
7f97c5e285 |
|
@ -1,36 +1,25 @@
|
||||||
# From original Dockerfile at https://github.com/TheCommsChannel/TC2-BBS-mesh
|
FROM alpine:latest
|
||||||
FROM debian:stable-slim AS build
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
# Install required packages
|
||||||
apt-get install -y \
|
RUN apk add --update --no-cache git python3 py3-pip
|
||||||
git \
|
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
RUN git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.git
|
RUN git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.git
|
||||||
|
|
||||||
####
|
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM python:alpine
|
|
||||||
|
|
||||||
# Switch to non-root user
|
|
||||||
RUN adduser --disabled-password mesh
|
|
||||||
USER mesh
|
|
||||||
RUN mkdir -p /home/mesh/bbs
|
|
||||||
WORKDIR /home/mesh/bbs
|
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
COPY --from=build /TC2-BBS-mesh/requirements.txt ./
|
RUN pip install --no-cache-dir --break-system-packages -r /TC2-BBS-mesh/requirements.txt
|
||||||
RUN pip install --no-cache-dir --break-system-packages -r requirements.txt
|
|
||||||
|
|
||||||
# Copy over app code
|
# Copy configuration script
|
||||||
COPY --from=build /TC2-BBS-mesh/*.py ./
|
COPY configini.sh /
|
||||||
|
|
||||||
|
# Set permissions for configuration script
|
||||||
|
RUN chmod +x /configini.sh
|
||||||
|
|
||||||
# Define config volume
|
# Define config volume
|
||||||
VOLUME /home/mesh/bbs/config
|
VOLUME /config
|
||||||
WORKDIR /home/mesh/bbs/config
|
|
||||||
COPY --from=build /TC2-BBS-mesh/example_config.ini ./config.ini
|
# Define working directory
|
||||||
COPY --from=build /TC2-BBS-mesh/fortunes.txt ./
|
WORKDIR /config
|
||||||
|
|
||||||
# Define the command to run
|
# Define the command to run
|
||||||
ENTRYPOINT [ "python3", "/home/mesh/bbs/server.py" ]
|
CMD ["sh", "-c", " /configini.sh && python3 /TC2-BBS-mesh/server.py"]
|
|
@ -3,5 +3,5 @@ services:
|
||||||
build: .
|
build: .
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/home/mesh/bbs/config
|
- ./config:/config
|
||||||
container_name: tc2-bbs-mesh
|
container_name: tc2-bbs-mesh
|
Loading…
Reference in a new issue