docker(install): fallback to journalctl to print docker daemon logs
colima only supports Ubuntu image since 0.6.0 which runs docker as systemd unit. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -362,7 +362,11 @@ EOF`,
|
||||
|
||||
private async tearDownDarwin(): Promise<void> {
|
||||
await core.group('Docker daemon logs', async () => {
|
||||
await Exec.exec('colima', ['exec', '--', 'cat', '/var/log/docker.log']);
|
||||
await Exec.exec('colima', ['exec', '--', 'cat', '/var/log/docker.log']).catch(async () => {
|
||||
await Exec.exec('colima', ['exec', '--', 'sudo', 'journalctl', '-u', 'docker.service', '-l', '--no-pager']).catch(() => {
|
||||
core.warning(`Failed to get Docker daemon logs`);
|
||||
});
|
||||
});
|
||||
});
|
||||
await core.group('Stopping colima', async () => {
|
||||
await Exec.exec('colima', ['stop', '--very-verbose']);
|
||||
|
||||
Reference in New Issue
Block a user