Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Alpine edge repositories from Dockerfile #341

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Conversation

lfdebrux
Copy link
Member

@lfdebrux lfdebrux commented Oct 10, 2023

What problem does this pull request solve?

In commit 6979388 we used both the stable and edge repos for Alpine because we wanted OpenSSL 3 in our app image. However, OpenSSL 3 is the default version of OpenSSL in Alpine 3.17.0 [1]. So we no longer have a need for edge.

With Alpine 3.17 at the time of this commit fetching the edge repo index fails, so building this Dockerfile fails with the error:

Step 24/35 : RUN apk update
 ---> Running in 247913f7587d
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/edge/main: BAD signature
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge/main: No such file or directory
v3.17.5-107-g07fd110f6bf [https://dl-cdn.alpinelinux.org/alpine/v3.17/main]
v3.17.5-108-gfe9a155566d [https://dl-cdn.alpinelinux.org/alpine/v3.17/community]
1 errors; 17699 distinct packages available
The command ‘/bin/sh -c apk update’ returned a non-zero code: 1

The Alpine wiki says that

Warning: Do not enable stable and edge repos at the same time. This can break your system. Either use edge or stable.

[2].

As we no longer need the edge repos, and it does not appear to work,
this commit removes the use of edge from the Dockerfile.

Things to consider when reviewing

  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@lfdebrux lfdebrux changed the title ### What problem does this pull request solve? Remove Apline edge repositories from Dockerfile Oct 10, 2023
@lfdebrux lfdebrux requested a review from danworth October 10, 2023 14:23
Copy link
Contributor

@jamie-o-wilkinson jamie-o-wilkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just noticed a typo in the title and commit message apline -> alpine

I'm not fussed though, I'll leave it to you 😄

@lfdebrux
Copy link
Member Author

Oh I just noticed a typo in the title and commit message apline -> alpine

I'm not fussed though, I'll leave it to you 😄

😱 good spot! I'm relieved that wasn't there in the other PRs 😅

@lfdebrux lfdebrux changed the title Remove Apline edge repositories from Dockerfile Remove Alpine edge repositories from Dockerfile Oct 16, 2023
@lfdebrux lfdebrux force-pushed the ldeb-no-alpine-edge branch from 9bbf7e0 to 67f0d4c Compare October 16, 2023 05:51
In commit 6979388 we used both the stable and edge repos for Alpine
because we wanted OpenSSL 3 in our app image. However, OpenSSL 3 is the
default version of OpenSSL in Alpine 3.17.0 [[1]]. So we no longer have
a need for edge.

With Alpine 3.17 at the time of this commit fetching the edge repo index
fails, so building this Dockerfile fails with the error:

```
Step 24/35 : RUN apk update
 ---> Running in 247913f7587d
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/edge/main: BAD signature
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge/main: No such file or directory
v3.17.5-107-g07fd110f6bf [https://dl-cdn.alpinelinux.org/alpine/v3.17/main]
v3.17.5-108-gfe9a155566d [https://dl-cdn.alpinelinux.org/alpine/v3.17/community]
1 errors; 17699 distinct packages available
The command ‘/bin/sh -c apk update’ returned a non-zero code: 1
```

The Alpine wiki says that

> Warning: Do not enable stable and edge repos at the same time. This
  can break your system. Either use edge or stable.

[[2]].

As we no longer need the edge repos, and it does not appear to work,
this commit removes the use of edge from the Dockerfile.

[1]: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.17.0
[2]: https://wiki.alpinelinux.org/wiki/Repositories
@lfdebrux lfdebrux force-pushed the ldeb-no-alpine-edge branch from 67f0d4c to 035535e Compare October 16, 2023 05:51
@lfdebrux lfdebrux enabled auto-merge October 16, 2023 05:51
@lfdebrux lfdebrux added this pull request to the merge queue Oct 16, 2023
Merged via the queue into main with commit 50ba95e Oct 16, 2023
2 checks passed
@lfdebrux lfdebrux deleted the ldeb-no-alpine-edge branch October 16, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants