Commit 20d8187b authored by nanahira's avatar nanahira

add lite Dockerfile

parent 15eaf6fa
# Dockerfile for SRVPro
FROM node:12-stretch
# apt
RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y wget git build-essential libssl1.0-dev libsqlite3-dev p7zip-full
# libevent
WORKDIR /
RUN wget 'https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz' -O libevent-2.0.22-stable.tar.gz --no-check-certificate && \
tar xf libevent-2.0.22-stable.tar.gz && \
cd libevent-2.0.22-stable/ && \
./configure && \
make && \
make install && \
cd .. && \
bash -c 'ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5;ln -s /usr/local/lib/libevent_pthreads-2.0.so.5 /usr/lib/libevent_pthreads-2.0.so.5;ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5;ln -s /usr/local/lib/libevent_pthreads-2.0.so.5 /usr/lib64/libevent_pthreads-2.0.so.5;exit 0' && \
rm -rf /libevent-2.0.22-stable.tar.gz /libevent-2.0.22-stable
# srvpro
COPY . /ygopro-server
WORKDIR /ygopro-server
RUN npm ci && \
mkdir config decks replays logs
# ygopro
RUN git clone --branch=server --recursive https://github.com/moecube/ygopro /ygopro-server/ygopro
WORKDIR /ygopro-server/ygopro
RUN git submodule foreach git checkout master && \
wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz | tar zfx - && \
./premake5 gmake && \
cd build && \
make config=release && \
cd .. && \
ln -s ./bin/release/ygopro . && \
strip ygopro && \
mkdir replay expansions
# infos
WORKDIR /ygopro-server
EXPOSE 7911
EXPOSE 7922
VOLUME [ /ygopro-server/config, /ygopro-server/decks, /ygopro-server/replays ]
CMD [ "node", "ygopro-server.js" ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment