Skip to content

install docker on aot images #11

install docker on aot images

install docker on aot images #11

Workflow file for this run

name: AOT Example
on:
push:
workflow_dispatch:
env:
GITHUB_USERNAME: baronfel
GITHUB_TOKEN: ${{ secrets.CONTAINER_PUSH_PAT }}
jobs:
aot:
name: "Build AOT Console App"
runs-on: ubuntu-latest
steps:
- name: Get the code
uses: actions/checkout@v2
- name: diagnose docker
run: echo $(which docker)
- name: diagnose docekr socket
run: ls /var/run/docker.sock
- name: check prereqs
run: |
docker run --rm \
-v $(pwd)/src:/src \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /src/aot-sample \
mcr.microsoft.com/dotnet/nightly/sdk:8.0-alpine-aot \
apk add docker && docker info
- name: build the app AOT-style
run: |
docker run --rm \
-v $(pwd)/src:/src \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /src/aot-sample \
mcr.microsoft.com/dotnet/nightly/sdk:8.0-alpine-aot \
apk add docker && dotnet publish /t:PublishContainer \
/p:ContainerBaseImage=mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine-extra \
--use-current-runtime
-bl
- name: Upload binlog
uses: actions/upload-artifact@v3
with:
path: src/aot-sample/msbuild.binlog
name: msbuild.binlog