-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (31 loc) · 922 Bytes
/
Dockerfile
File metadata and controls
33 lines (31 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
WORKDIR /app
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet workload restore && dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0
LABEL org.opencontainers.image.source="https://github.com/Freeesia/CacheOGP"
ENV LANG=ja_JP.UTF-8
RUN apt-get update && apt-get install -y \
libgtk-3.0 \
libgbm-dev \
libnss3 \
libatk-bridge2.0-0 \
libasound2 \
locales \
# ここからフォント関連
fonts-noto-color-emoji \
fonts-noto-cjk &&\
echo "ja_JP UTF-8" > /etc/locale.gen &&\
locale-gen &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
WORKDIR /app
EXPOSE 8080
COPY --from=build-env /app/out .
VOLUME [ "/tmp/cache-ogp" ]
ENTRYPOINT ["dotnet", "CacheOGP.ApiService.dll"]