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 







댓글 없음:

댓글 쓰기

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

Xcode 26의 새로운 기능들

 애플의 AI준비에 대한 골든타임이 지나가고 있다는 말이 많이 들립니다. ㅎㅎ  애플의 그동안의 패쇄적인 환경을 생각하면 온디바이스AI나 LLM환경에서 다소 아쉬운 부분이 많이 있습니다. 다른 빅테크들과 전혀 다른 방향의 목소리를 내고 있어서 좀 우려...