2020년 5월 12일 화요일

Azure 실습 mac에서 터미널 오픈해서 도커 이미지 받고 빌드해서 웹 앱 실행하기

윈도우를 부팅하기 귀찮아서 맥에서 그대로 MOC교재의 실습을 하고 있는데 전혀 문제 없네요. ㅎㅎ


git clone https://github.com/MicrosoftDocs/mslearn-hotel-reservation-sys-
tem.git

cd mslearn-hotel-reservation-system/src


비주얼스튜디오코드로  Dockerfile 생성하기 



  1. #1
    FROM mcr.microsoft.com/dotnet/core/sdk:2.2
    WORKDIR /src
    COPY ["HotelReservationSystem/HotelReservationSystem.csproj", "HotelReservationSystem/"] COPY ["HotelReservationSystemTypes/HotelReservationSystemTypes.csproj", "HotelReservationSys- temTypes/"]
    RUN dotnet restore "HotelReservationSystem/HotelReservationSystem.csproj"
    #2
    COPY . .
    WORKDIR "/src/HotelReservationSystem"
    RUN dotnet build "HotelReservationSystem.csproj" -c Release -o /app

    #3
    RUN dotnet publish "HotelReservationSystem.csproj" -c Release -o /app
    #4
    EXPOSE 80
    WORKDIR /app
    ENTRYPOINT ["dotnet", "HotelReservationSystem.dll"]
맥에서도 빌드가 잘 됩니다. 
  1. docker build -t reservationsystem . 
웹서버를 실행합니다. 
  1. docker run -p 8080:80 -d --name reservations reservationsystem 







댓글 없음:

댓글 쓰기

참고: 블로그의 회원만 댓글을 작성할 수 있습니다.

미국에서 만들고 있는 데이터 센터들 - AI시장이 얼마나 커질까?

 말도 안되는 규모로 테슬라, 메타, OpenAI의 스타게이트 연합군에서 짓고 있는 데이터 센터들입니다.  1기가와트, 2기가와트, 5기가와트 ㅎㅎ  앞으로 세상이 정말 더 많이 변할 것 같습니다. 저는 하드웨어를 직접 다루지 않기 때문에 IDC센터를...