Skip to content

Commit c7b03d3

Browse files
authored
Merge pull request #74 from adobejmong/ETHOS-38706
feat: force yum update for CentOS and deprecate Alpine/CentOS variants
2 parents 46c4399 + 1c0f968 commit c7b03d3

File tree

4 files changed

+74
-2
lines changed

4 files changed

+74
-2
lines changed

Dockerfile-alpine

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
################################################################################
2+
# The AlpineOS flavor is DEPRECATED and will be removed in a future release
3+
# Please stop using this variant and use the Ubuntu flavor instead
4+
################################################################################
15
FROM alpine:3.15 as base
26

37
### Stage 1 - add/remove packages ###

Dockerfile-centos-7

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
################################################################################
2+
# The CentOS flavor is DEPRECATED and will be removed in a future release
3+
# Please stop using this variant and use the Ubuntu flavor instead
4+
################################################################################
15
FROM centos:7 as base
26

37
### Stage 1 - add/remove packages ###
@@ -14,6 +18,7 @@ RUN ln -s /scripts/clean_centos.sh /clean.sh && \
1418
ln -s /scripts/security_updates_centos.sh /security_updates.sh && \
1519
/bin/bash -e /security_updates.sh && \
1620
rpm -e systemd --nodeps && \
21+
yum -y update && \
1722
/bin/bash -e /clean.sh && \
1823
/bin/bash -e /scripts/install_s6.sh && \
1924
/bin/bash -e /scripts/install_goss.sh

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Provides base OS, security patches, and tools for quick and easy spinup.
1313
* Ubuntu 18.04 LTS available, tagged as `-VERSION#-ubuntu-18.04`
1414
* Ubuntu 20.04 LTS available, tagged as `-VERSION#-ubuntu-20.04`
1515
* Ubuntu 22.04 LTS available, tagged as `-VERSION#-ubuntu-22.04`
16-
* Alpine builds available, tagged as `-alpine`
17-
* Centos 7 builds available, tagged as `-centos-7`
16+
* Alpine builds available, tagged as `-alpine` **DEPRECATED**
17+
* Centos 7 builds available, tagged as `-centos-7` **DEPRECATED**
1818

1919
### Tools
2020

docs/troubleshooting.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Troubleshooting
2+
3+
* [gpg: keyserver receive failed: End of file](#gpg-keyserver-receive-failed-end-of-file)
4+
5+
# gpg: keyserver receive failed: End of file
6+
7+
There have been cases where the `install_s6.sh` script fails with:
8+
9+
```
10+
#13 11.49 gpg: directory '/root/.gnupg' created
11+
#13 11.50 gpg: keybox '/root/.gnupg/pubring.kbx' created
12+
#13 15.49 gpg: keyserver receive failed: End of file
13+
#13 ERROR: process "/bin/sh -c ln -s /scripts/clean_alpine.sh /clean.sh
14+
[...snip...]
15+
```
16+
17+
If you look at the `install_s6.sh` script, it fails on this line:
18+
19+
```
20+
gpg --keyserver pgp.surfnet.nl --recv-keys $PUBLIC_KEY
21+
```
22+
23+
If you try to manually run this command, it fails:
24+
25+
```
26+
gpg --keyserver pgp.surfnet.nl --recv-keys 6101B2783B2FD161
27+
gpg: directory '/root/.gnupg' created
28+
gpg: keybox '/root/.gnupg/pubring.kbx' created
29+
gpg: keyserver receive failed: End of file
30+
root@dd54b59b57c5:/# echo $?
31+
2
32+
```
33+
34+
As a workaround (for now), I found [#352] and in the comments, I found a
35+
solution from `mikenye` where he [embeds the actual public key].
36+
37+
So if you're building locally and are runing into this failure try:
38+
39+
1. Copy the public key from `mikenye`'s PR and save it as `s6-gpg-pub-key`
40+
1. Update the Dockerfile instructions to copy the file to `/tmp`
41+
i.e. `COPY s6-gpg-pub-key /tmp/s6-gpg-pub-key`
42+
1. Update `install_s6.sh`. Instead of:
43+
```
44+
gpg --keyserver pgp.surfnet.nl --recv-keys 6101B2783B2FD161
45+
```
46+
47+
You do:
48+
```
49+
gpg --import /tmp/s6-gpg-pub-key
50+
rm /tmp/s6-gpg-pub-key
51+
```
52+
1. The rest of the commands should be the same
53+
54+
In more recent versions of s6-overlay i.e. `3.x`, it looks like their
55+
[verification steps] are different. So this could be a temporary issue
56+
until we upgrade to the latest s6-overlay version.
57+
58+
If we're going to stay on this version for a while, we might just end up
59+
baking in the public key
60+
61+
[#352]: https://github.com/just-containers/s6-overlay/issues/352
62+
[embeds the actual public key]: https://github.com/mikenye/deploy-s6-overlay/pull/10
63+
[verification steps]: https://github.com/just-containers/s6-overlay/#verifying-downloads

0 commit comments

Comments
 (0)