Skip to content

Commit

Permalink
fix: "No package docker available" on AL2 (#649)
Browse files Browse the repository at this point in the history
Installing Docker on Amazon Linux 2 based images failed with:

```
4.636 No package docker available.
4.879 Error: Nothing to do
------
Dockerfile:19
--------------------
17 |
18 |     COPY component5-Docker.sh /tmp
19 | >>> RUN /tmp/component5-Docker.sh
20 |
21 |     COPY component6-GithubRunner.sh /tmp
--------------------
ERROR: failed to solve: process "/bin/sh -c /tmp/component5-Docker.sh" did not complete successfully: exit code: 1
```

Fixes #646
  • Loading branch information
kichik authored Nov 1, 2024
1 parent 3919742 commit f05173a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/image-builders/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,16 @@ export abstract class RunnerImageComponent {
];
} else if (os.is(Os.LINUX_AMAZON_2)) {
return [
'yum install -y docker',
'sudo usermod -a -G docker runner',
'amazon-linux-extras install docker',
'usermod -a -G docker runner',
'curl -sfLo /usr/bin/docker-compose https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s | tr \'[:upper:]\' \'[:lower:]\')-$(uname -m)',
'chmod +x /usr/bin/docker-compose',
'ln -s /usr/bin/docker-compose /usr/libexec/docker/cli-plugins/docker-compose',
];
} else if (os.is(Os.LINUX_AMAZON_2023)) {
return [
'dnf install -y docker',
'sudo usermod -a -G docker runner',
'usermod -a -G docker runner',
'curl -sfLo /usr/bin/docker-compose https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s | tr \'[:upper:]\' \'[:lower:]\')-$(uname -m)',
'chmod +x /usr/bin/docker-compose',
'ln -s /usr/bin/docker-compose /usr/libexec/docker/cli-plugins/docker-compose',
Expand Down

0 comments on commit f05173a

Please sign in to comment.