FROM debian:11
# LABEL maintainer="Chengdu Xugu Weiye Technology Co.,Ltd"

# Environment
ENV DB_DISTRO_NAME=xugu11
ENV DB_KERNEL_VERSION=12.1.9
ENV DB_BUILD_TIME=20230813
ENV DB_BUILD_ARCH=x86_64
ENV DB_ROOT_DIR=/opt/database
ENV DB_SERVER_DIR=${DB_ROOT_DIR}/Server

# Install base dependency from package manager
RUN apt -y update && \
    apt -y install libaio1

# Install xugu11
ADD Server ${DB_SERVER_DIR}

# Create a volume that mapped to the Server directory
VOLUME ${DB_SERVER_DIR}

# Set default listen port in container
EXPOSE 5138
# Set default work directory
WORKDIR ${DB_ROOT_DIR}
# Set container entrypoint program
ENTRYPOINT ["/opt/database/Server/BIN/xugu11_linux_x86_64_20230813", "--child"]
