Skip to content

Commit

Permalink
Remove Alpine edge repositories from Dockerfile
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lfdebrux committed Oct 16, 2023
1 parent c0453f6 commit 67f0d4c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ ENV RAILS_ENV="${RAILS_ENV:-production}" \

WORKDIR /app

# Edge repo is necessary for openssl 3
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
RUN apk update
RUN apk upgrade --available
RUN apk add libc6-compat openssl-dev libpq
Expand Down

0 comments on commit 67f0d4c

Please sign in to comment.