Some basic docker comamnds:
sudo docker image list
sudo docker run nginx
sudo docker run hello-world
sudo docker
sudo docker build -t myconsole2 .
My first dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/core/runtime:3.1 AS runtime-env
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT [ "/app/console2" ]
docker exec --it {containerID} /bin/sh