Commit 2823c758 authored by nanahira's avatar nanahira

improve_image

parent 92d6b1e3
# Dockerfile for SRVPro # Dockerfile for SRVPro
FROM node:12-stretch-slim FROM node:12-stretch-slim
RUN npm install -g pm2
# apt # apt
RUN apt update && \ RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y wget git build-essential libevent-dev libsqlite3-dev mono-complete p7zip-full redis-server env DEBIAN_FRONTEND=noninteractive apt install -y wget git build-essential libevent-dev libsqlite3-dev mono-complete p7zip-full redis-server && \
rm -rf /var/lib/apt/lists/*
RUN npm install -g pm2
# srvpro # srvpro
COPY . /ygopro-server COPY . /ygopro-server
...@@ -14,24 +15,27 @@ RUN npm ci && \ ...@@ -14,24 +15,27 @@ RUN npm ci && \
mkdir config decks replays logs /redis mkdir config decks replays logs /redis
# ygopro # ygopro
RUN git clone --branch=server --recursive --depth=1 https://github.com/moecube/ygopro /ygopro-server/ygopro RUN git clone --branch=server --recursive --depth=1 https://github.com/moecube/ygopro && \
WORKDIR /ygopro-server/ygopro cd ygopro && \
RUN git submodule foreach git checkout master && \ 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 - && \ wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha13-linux.tar.gz | tar zfx - && \
./premake5 gmake && \ ./premake5 gmake && \
cd build && \ cd build && \
make config=release && \ make config=release && \
cd .. && \ cd .. && \
ln -s ./bin/release/ygopro . && \ mv ./bin/release/ygopro . && \
strip ygopro && \ strip ygopro && \
mkdir replay expansions mkdir replay expansions && \
rm -rf .git* bin obj build ocgcore cmake lua premake* sound textures .travis.yml *.txt appveyor.yml LICENSE README.md *.lua strings.conf system.conf && \
ls gframe | sed '/game.cpp/d' | xargs -I {} rm -rf gframe/{}
# windbot # windbot
RUN git clone --depth=1 https://github.com/moecube/windbot /ygopro-server/windbot RUN git clone --depth=1 https://github.com/moecube/windbot /tmp/windbot && \
WORKDIR /ygopro-server/windbot cd /tmp/windbot && \
RUN xbuild /property:Configuration=Release /property:TargetFrameworkVersion="v4.5" && \ xbuild /property:Configuration=Release /property:TargetFrameworkVersion="v4.5" && \
ln -s ./bin/Release/WindBot.exe . && \ mv /tmp/windbot/bin/Release /ygopro-server/windbot && \
ln -s /ygopro-server/ygopro/cards.cdb . cp -rf /ygopro-server/ygopro/cards.cdb /ygopro-server/windbot/ && \
rm -rf /tmp/windbot
# infos # infos
WORKDIR /ygopro-server WORKDIR /ygopro-server
......
...@@ -3,7 +3,8 @@ FROM node:12-stretch-slim ...@@ -3,7 +3,8 @@ FROM node:12-stretch-slim
# apt # apt
RUN apt update && \ RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y wget git build-essential libsqlite3-dev libevent-dev p7zip-full env DEBIAN_FRONTEND=noninteractive apt install -y wget git build-essential libsqlite3-dev libevent-dev p7zip-full && \
rm -rf /var/lib/apt/lists/*
# srvpro # srvpro
COPY . /ygopro-server COPY . /ygopro-server
...@@ -11,18 +12,19 @@ WORKDIR /ygopro-server ...@@ -11,18 +12,19 @@ WORKDIR /ygopro-server
RUN npm ci && \ RUN npm ci && \
mkdir config decks replays logs mkdir config decks replays logs
# ygopro RUN git clone --branch=server --recursive --depth=1 https://github.com/moecube/ygopro && \
RUN git clone --branch=server --recursive --depth=1 https://github.com/moecube/ygopro /ygopro-server/ygopro cd ygopro && \
WORKDIR /ygopro-server/ygopro git submodule foreach git checkout master && \
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-alpha13-linux.tar.gz | tar zfx - && \
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 && \ ./premake5 gmake && \
cd build && \ cd build && \
make config=release && \ make config=release && \
cd .. && \ cd .. && \
ln -s ./bin/release/ygopro . && \ mv ./bin/release/ygopro . && \
strip ygopro && \ strip ygopro && \
mkdir replay expansions mkdir replay expansions && \
rm -rf .git* bin obj build ocgcore cmake lua premake* sound textures .travis.yml *.txt appveyor.yml LICENSE README.md *.lua strings.conf system.conf && \
ls gframe | sed '/game.cpp/d' | xargs -I {} rm -rf gframe/{}
# infos # infos
WORKDIR /ygopro-server WORKDIR /ygopro-server
......
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