ASP.NET Core 7 / Blazor Server App / Dockerfile

 

GitHub의 qiime2 아래 linux-worker-docker 프로젝트를 참고한다.

https://github.com/qiime2/linux-worker-docker

 

GitHub - qiime2/linux-worker-docker

Contribute to qiime2/linux-worker-docker development by creating an account on GitHub.

github.com

위 프로젝트의 Dockerfile 내용을 Blazor Server App의 Dockerfile 에 추가한다.

#See https://aka.ms/customizecontainer to learn how to customize your debug container
# and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base

WORKDIR /app
EXPOSE 80
EXPOSE 443

# Locale for click
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

# Utilities
RUN apt-get update -q
RUN apt-get install -yq wget unzip bzip2 git build-essential

# Install conda
RUN wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda3.sh
RUN /bin/bash /tmp/miniconda3.sh -bp /opt/miniconda3
RUN rm /tmp/miniconda3.sh

# Update conda and install conda-build
RUN /opt/miniconda3/bin/conda update -yq conda
RUN /opt/miniconda3/bin/conda install -yq conda-build wget

RUN wget -q https://data.qiime2.org/distro/core/qiime2-2023.5-py38-linux-conda.yml
RUN /opt/miniconda3/bin/conda env create -yq -n qiime2-2023.5 --file qiime2-2023.5-py38-linux-conda.yml

# Install any other goodies
#RUN /opt/miniconda3/bin/conda run pip install -q https://github.com/qiime2/q2lint/archive/master.zip
#RUN /opt/miniconda3/bin/conda install -yq -c conda-forge nodejs

# Set conda environment
RUN echo "export PATH=/opt/miniconda3/bin:$PATH" > /etc/profile
ENV PATH /opt/miniconda3/bin:$PATH


FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["TestBlazorServerApp/TestBlazorServerApp.csproj", "TestBlazorServerApp/"]
RUN dotnet restore "TestBlazorServerApp/TestBlazorServerApp.csproj"
COPY . .
WORKDIR "/src/TestBlazorServerApp"
RUN dotnet build "TestBlazorServerApp.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "TestBlazorServerApp.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "TestBlazorServerApp.dll"]

 

'BIO' 카테고리의 다른 글

C#에서 Linux 환경에 설치된 QIIME 2 실행하기  (0) 2023.08.02
FASTQ format in QIIME 2  (0) 2023.08.01
Installing the QIIME 2 Core 2023.5 distribution using WSL  (0) 2023.07.31
QIIME 2 Core concepts  (0) 2023.07.31
FASTAQ  (0) 2023.07.31

+ Recent posts