it builds, and hopefully runs?
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 2m53s

This commit is contained in:
Merith-TK 2025-07-05 03:36:34 +01:00
parent ba547a2130
commit d7a6b77e57
13 changed files with 1382 additions and 519 deletions

View file

@ -1,25 +1,46 @@
FROM postgres:15.1
FROM eclipse-temurin:17-jammy
# Install required packages
RUN apt-get update && apt install -y \
postgresql-15-postgis-3 \
openjdk-17-jdk \
# Install all required packages
RUN apt-get update && apt-get install -y \
postgresql-common \
emacs-nox \
net-tools \
netcat \
vim \
unzip \
&& rm -rf /var/lib/apt/lists/*
curl \
sudo \
gosu
# Create the tak directory and logs directory
RUN mkdir -p /opt/tak /opt/tak/logs
RUN yes | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
RUN apt-get update && apt-get install -y \
postgresql-15 \
postgresql-15-postgis-3 \
postgresql-client-15 \
postgresql-contrib-15
# Create entrypoint script that handles TAK archive extraction
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create tak user and directories
RUN useradd -m -s /bin/bash tak && \
mkdir -p /opt/tak /opt/tak/logs /takserver-zip && \
chown -R tak:tak /opt/tak
# Configure PostgreSQL data directory (initialization will be done at runtime)
RUN mkdir -p /var/lib/postgresql/15/main && \
chown -R postgres:postgres /var/lib/postgresql
# Copy all scripts into the container
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY scripts/ /scripts/
# Set environment variables
ENV TAK_MODE=server
ENV TAK_ARCHIVE_PATH=/tak-archive/takserver-docker-5.4-RELEASE-19.zip
# Make all scripts executable
RUN chmod +x /entrypoint.sh && \
chmod +x /scripts/*.sh
# Expose common TAK server ports
EXPOSE 5432 8080 8443 8444 8446
# Set the entrypoint
ENTRYPOINT ["/entrypoint.sh"]