Skip to content

Commit 03b93c3

Browse files
committed
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 <[email protected]>
1 parent f8909e3 commit 03b93c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/docker/install.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,11 @@ EOF`,
362362

363363
private async tearDownDarwin(): Promise<void> {
364364
await core.group('Docker daemon logs', async () => {
365-
await Exec.exec('colima', ['exec', '--', 'cat', '/var/log/docker.log']);
365+
await Exec.exec('colima', ['exec', '--', 'cat', '/var/log/docker.log']).catch(async () => {
366+
await Exec.exec('colima', ['exec', '--', 'sudo', 'journalctl', '-u', 'docker.service', '-l', '--no-pager']).catch(() => {
367+
core.warning(`Failed to get Docker daemon logs`);
368+
});
369+
});
366370
});
367371
await core.group('Stopping colima', async () => {
368372
await Exec.exec('colima', ['stop', '--very-verbose']);

0 commit comments

Comments
 (0)