Skip to content

Commit a87c23e

Browse files
docker again
1 parent 7f3257c commit a87c23e

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.vs/
2+
bin/
3+
obj/
4+
ImgGen.csproj.user
5+
6+
/pico
7+
/picn
8+
/pics
9+
10+
/System.Data.SQLite.dll
11+
12+
Dockerfile
13+
.dockerignore

Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM mono:5.20.1.34 as sqlite-builder
2+
3+
RUN apt-get update && \
4+
apt-get -y install wget sqlite3 libsqlite3-dev p7zip-full && \
5+
rm -rf /var/lib/apt/lists/*
6+
WORKDIR /
7+
RUN wget https://minio.mycard.moe:9000/nanahira/sqlite-netFx-full-source-1.0.112.0.zip && \
8+
7z x -y -osqlite sqlite-netFx-full-source-1.0.112.0.zip && \
9+
cd sqlite && \
10+
xbuild /p:Configuration=Release /p:UseInteropDll=false /p:UseSqliteStandard=true ./System.Data.SQLite/System.Data.SQLite.2015.csproj
11+
12+
FROM mono:5.20.1.34 as builder
13+
14+
COPY . /ImgGen
15+
WORKDIR /ImgGen
16+
COPY --from=sqlite-builder /sqlite/bin/2015/ReleaseMonoOnPosix/bin/System.Data.SQLite.dll .
17+
RUN xbuild /p:Configuration=Release /p:TargetFrameworkVersion=v4.6
18+
19+
FROM mono:5.20.1.34
20+
21+
RUN apt-get update && \
22+
apt-get -y install xfonts-utils fontconfig wget p7zip-full && \
23+
rm -rf /var/lib/apt/lists/*
24+
25+
WORKDIR /
26+
RUN wget https://minio.mycard.moe:9000/nanahira/ImgGen-Fonts.7z && \
27+
7z x -y -o/usr/share/fonts ImgGen-Fonts.7z && \
28+
rm -rf ImgGen-Fonts.7z && \
29+
mkfontscale && \
30+
mkfontdir && \
31+
fc-cache -fv
32+
33+
COPY --from=builder /ImgGen/bin/Release /usr/src/app
34+
WORKDIR /usr/src/app
35+
36+
RUN cp -rf /usr/share/fonts/ImgGen.exe.config .
37+
38+
ENTRYPOINT [ "mono" ]
39+
CMD [ "ImgGen.exe", "./cards.cdb" ]

0 commit comments

Comments
 (0)