Commit 441ac6e0 authored by nanahira's avatar nanahira

use multi stage

parent ed2a669d
FROM mono FROM mono as builder
RUN apt update && env DEBIAN_FRONTEND=noninteractive apt install -y wget git
COPY . /windbot-source COPY . /windbot-source
WORKDIR /windbot-source WORKDIR /windbot-source
RUN xbuild /p:Configuration=Release /p:TargetFrameworkVersion=v4.5 /p:OutDir=/windbot/ RUN xbuild /p:Configuration=Release /p:TargetFrameworkVersion=v4.5 /p:OutDir=/windbot/
RUN git clone --depth=1 https://github.com/purerosefallen/ygopro-database /ygopro-database && \
cp -rf /ygopro-database/locales/zh-CN/cards.cdb /windbot/
FROM mono
COPY --from=builder /windbot /windbot
WORKDIR /windbot WORKDIR /windbot
RUN curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/purerosefallen/ygopro-database/raw/master/locales/zh-CN/cards.cdb
EXPOSE 2399 EXPOSE 2399
CMD [ "mono", "/windbot/WindBot.exe", "ServerMode=true", "ServerPort=2399" ] CMD [ "mono", "/windbot/WindBot.exe", "ServerMode=true", "ServerPort=2399" ]
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