ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
2024-10-08 19:37:10.096724|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.7 (2022-06-20 12:21:53)
2024-10-08 19:37:10.096791|INFO    |ServerLibPriv |   |SystemInformation: Linux 5.10.224-212.876.amzn2.x86_64 #1 SMP Thu Aug 22 16:55:24 UTC 2024 x86_64 Binary: 64bit
2024-10-08 19:37:10.096817|INFO    |ServerLibPriv |   |Using hardware aes
2024-10-08 19:37:10.097442|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
2024-10-08 19:37:10.097812|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
2024-10-08 19:37:10.098159|ERROR   |DatabaseQuery |   |db_connect() failed unable to open database file
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
2024-10-08 19:37:10.098384|CRITICAL|ServerLibPriv |   |Server() DatabaseError out of memory
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_10.096684_0.log) failed
2024-10-08 19:37:11.052122|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.7 (2022-06-20 12:21:53)
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed
2024-10-08 19:37:11.061418|INFO    |ServerLibPriv |   |SystemInformation: Linux 5.10.224-212.876.amzn2.x86_64 #1 SMP Thu Aug 22 16:55:24 UTC 2024 x86_64 Binary: 64bit
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed
2024-10-08 19:37:11.061719|INFO    |ServerLibPriv |   |Using hardware aes
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed
2024-10-08 19:37:11.062492|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed
2024-10-08 19:37:11.062834|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed
2024-10-08 19:37:11.063229|ERROR   |DatabaseQuery |   |db_connect() failed unable to open database file
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed
2024-10-08 19:37:11.063405|CRITICAL|ServerLibPriv |   |Server() DatabaseError out of memory
ERROR: openFile( file:logs/ts3server_2024-10-08__19_37_11.052085_0.log) failed

# Use a lightweight base image
FROM ubuntu:20.04

# Update package sources and install necessary packages
RUN apt-get update && apt-get install -y \
    wget \
    bzip2 \
    locales \
    && rm -rf /var/lib/apt/lists/*

# Generate and set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
    locale-gen
ENV LANG en_US.UTF-8  
ENV LANGUAGE en_US:en  
ENV LC_ALL en_US.UTF-8     

# Set working directory
WORKDIR /teamspeak

# Download and extract the TeamSpeak server
RUN wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2 \
    && tar xvf teamspeak3-server_linux_amd64-3.13.7.tar.bz2 \
    && rm teamspeak3-server_linux_amd64-3.13.7.tar.bz2 \
    && touch teamspeak3-server_linux_amd64/.ts3server_license_accepted

# Create necessary directories for logs and databases with appropriate permissions
RUN mkdir -p teamspeak3-server_linux_amd64/logs teamspeak3-server_linux_amd64/databases \
    && chown -R root:root teamspeak3-server_linux_amd64 \
    && chmod -R 755 teamspeak3-server_linux_amd64  # Ensure proper permissions

# Set environment variable for license acceptance
ENV TS3SERVER_LICENSE=accept

# Expose necessary ports
EXPOSE 9987/udp 10011 30033

# Command to run the server
CMD ["./teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh"]