diff --git a/.github/workflows/runner-scripts/create-vm.txt b/.github/workflows/runner-scripts/create-vm.txt index c46f41e69a..914fd1778b 100644 --- a/.github/workflows/runner-scripts/create-vm.txt +++ b/.github/workflows/runner-scripts/create-vm.txt @@ -5,22 +5,24 @@ az vm create \ --resource-group Testnet \ --name MakeImageVM \ --image Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:20.04.202206220 \ + --security-type 'Standard' \ --admin-username obscurouser --admin-password 'PWD' ssh obscurouser@IPADDRESS sudo apt-get update \ && sudo apt-get install -y gcc \ - && sudo snap refresh && sudo snap install --channel=1.20 go --classic \ + && sudo snap refresh && sudo snap install go --channel=1.21/stable --classic \ && curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh exit az vm deallocate --resource-group Testnet --name MakeImageVM az vm generalize --resource-group Testnet --name MakeImageVM +az image delete --resource-group Testnet --name ObscuroConfUbuntu az image create --resource-group Testnet --name ObscuroConfUbuntu --source MakeImageVM --hyper-v-generation V2 az vm delete --resource-group Testnet --name MakeImageVM --yes -az disk delete --resource-group Testnet --name MakeImageVM_OSDisk --yes -az network nic delete --resource-group Testnet --name MakeImageVM_NIC +az disk delete --resource-group Testnet --name MakeImageVM_OsDisk- --yes --no-wait +az network nic delete --resource-group Testnet --name MakeImageVMVMNIC --no-wait diff --git a/go/common/docker/docker.go b/go/common/docker/docker.go index 3262f75d97..eb115c7d9c 100644 --- a/go/common/docker/docker.go +++ b/go/common/docker/docker.go @@ -89,6 +89,12 @@ func StartNewContainer(containerName, image string, cmds []string, ports []int, exposedPorts[nat.Port(fmt.Sprintf("%d/tcp", port))] = struct{}{} } + // set log rotations + logOptions := map[string]string{ + "max-size": "10m", + "max-file": "3", + } + // create the container resp, err := cli.ContainerCreate(ctx, &container.Config{ Image: image, @@ -101,6 +107,7 @@ func StartNewContainer(containerName, image string, cmds []string, ports []int, PortBindings: portBindings, Mounts: mountVolumes, Resources: container.Resources{Devices: deviceMapping}, + LogConfig: container.LogConfig{Type: "json-file", Config: logOptions}, }, &network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{