Something went wrong. Try again.
Perl game server for TLE Community
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061FROM perl:5.40-bookworm
ENV ANYEVENT_WEBSOCKET_TEST_SKIP_SSL=1
WORKDIR /home/lacuna/server
# System libraries the XS dependencies link against (Debian package names).RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ pkg-config \ git \ curl \ ca-certificates \ default-libmysqlclient-dev \ libgd-dev \ libexpat1-dev \ libxml2-dev \ libssl-dev \ zlib1g-dev \ libncurses-dev \ libmemcached-dev \ && rm -rf /var/lib/apt/lists/*
RUN cpanm --notest Carton
# Memcached::libmemcached compiles a bundled libmemcached from source (a full# autotools project) and overruns cpanm's default build-phase timeout. Carton# wipes PERL_CPANM_OPT, so it can't pass the longer timeout through — pre-install# this one module into ./local with an explicit timeout (version pinned to match# the snapshot); carton then finds it already satisfied and skips it.RUN cpanm --notest -l local --build-timeout=3600 --configure-timeout=1800 \ Memcached::libmemcached@1.001801
COPY ./cpanfile ./cpanfile.snapshot /home/lacuna/server
# With a committed cpanfile.snapshot, install strictly from it (reproducible).# On the very first build (no snapshot yet), resolve freely and generate one —# extract it with `docker cp` and commit it, then all later builds are pinned.RUN carton install --deployment \ && rm -rf /root/.cpanm /root/.perl-cpm
COPY . /home/lacuna/server
# Carton installs into ./local — put its binaries and libs on the default# search paths so `plackup` / `perl` in bin/startdev.sh and the compose# `command:` lines resolve without needing `carton exec`.ENV PATH="/home/lacuna/server/local/bin:${PATH}" \ PERL5LIB="/home/lacuna/server/local/lib/perl5" \ PERLLIB="/home/lacuna/server/lib" \ TERM=xterm
# Log tree (mirrors docker/nginx/Dockerfile's `mkdir /etc/nginx/logs`). Compose# bind-mounts host ./log over this at run time; creating it here means the# subdirs still exist when the mount is absent (bare-metal, or the test overlay# which redirects LACUNA_LOG_DIR elsewhere).RUN mkdir -p /home/lacuna/server/log/server \ /home/lacuna/server/log/scheduler \ /home/lacuna/server/log/cron
CMD ["/bin/bash", "./bin/start_lacuna.sh"]