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

alpine:latest can not reach outside #151

Closed
ghost opened this issue Feb 26, 2021 · 4 comments
Closed

alpine:latest can not reach outside #151

ghost opened this issue Feb 26, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2021

For the second time in a row we bite our tails on:

fatal: unable to access 'https://github.tools.sap/repoX/actions/': Could not resolve host: github.tools.sap

This happens when we use actions like this:
https://github.com/anothrNick/github-tag-action/blob/master/Dockerfile

I already committed a PR but I wonder. Why does latest alpine not work.

As soon as one switches to alpine:3.10 it suddenly works. Why?

Is this already known? If wanted I can try to reproduce with public actions (as our SAP ones are not public)...?

@dockerpirate
Copy link

same problem!!! I've armv7

`dietpi@hass:~/alpine$ sudo docker run busybox ping -c 3 192.203.230.10
PING 192.203.230.10 (192.203.230.10): 56 data bytes
64 bytes from 192.203.230.10: seq=0 ttl=58 time=15.378 ms
64 bytes from 192.203.230.10: seq=1 ttl=58 time=14.127 ms
64 bytes from 192.203.230.10: seq=2 ttl=58 time=13.911 ms

--- 192.203.230.10 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 13.911/14.472/15.378 ms
dietpi@hass:/alpine$ sudo docker run alpine:3.13 ping -c 3 192.203.230.10
PING 192.203.230.10 (192.203.230.10): 56 data bytes
ping: clock_gettime(MONOTONIC) failed
dietpi@hass:
/alpine$ sudo docker run alpine:3.12 ping -c 3 192.203.230.10
PING 192.203.230.10 (192.203.230.10): 56 data bytes
64 bytes from 192.203.230.10: seq=0 ttl=58 time=15.622 ms
64 bytes from 192.203.230.10: seq=1 ttl=58 time=14.237 ms
64 bytes from 192.203.230.10: seq=2 ttl=58 time=14.174 ms

--- 192.203.230.10 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 14.174/14.677/15.622 ms
dietpi@hass:/alpine$ sudo docker run alpine:3.13.1 ping -c 3 192.203.230.10
Unable to find image 'alpine:3.13.1' locally
3.13.1: Pulling from library/alpine
9b1db703a337: Pull complete
Digest: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
Status: Downloaded newer image for alpine:3.13.1
PING 192.203.230.10 (192.203.230.10): 56 data bytes
ping: clock_gettime(MONOTONIC) failed
dietpi@hass:
/alpine$ sudo docker run alpine:3.13.2 ping -c 3 192.203.230.10
Unable to find image 'alpine:3.13.2' locally
3.13.2: Pulling from library/alpine
f55b840e27d3: Already exists
Digest: sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1ee22fa34f8cf46f96a3be
Status: Downloaded newer image for alpine:3.13.2
PING 192.203.230.10 (192.203.230.10): 56 data bytes
ping: clock_gettime(MONOTONIC) failed
`

@ghost
Copy link
Author

ghost commented Mar 17, 2021

Let me close this one in favor of #155

@ghost ghost closed this as completed Mar 17, 2021
@ncopa
Copy link
Contributor

ncopa commented May 4, 2021

i suspect this is due to the time64 change in recent musl libc, in combination with the libseccomp/docker issue.

It should work if you have either:

  • newer kernel
  • updated libseccomp and updated docker

@rjmooney
Copy link

rjmooney commented Nov 26, 2023

As @ncopa alludes to, this issue appears to manifest on older versions of certain Linux distributions.

In my case, I was running an older version of Raspbian (10; Buster) and was able to resolve the issue by upgrading libseccomp2 and Docker on the host like so:

#!/usr/bin/env bash
#
# Upgrade Docker and libseccomp2.
#
# Based on the following:
#                                                                                                                                                  
# * https://docs.docker.com/engine/install/raspberry-pi-os/
# * https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/
#
# Add the libseccomp2 backports repository
echo 'deb http://httpredir.debian.org/debian buster-backports main contrib non-free' | sudo tee -a /etc/apt/sources.list.d/debian-backports.list 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131                                                  
sudo apt update

# Next, add the official docker GPG key
sudo apt install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg                                   
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Next, add the official docker repository
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/raspbian \                   
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update

# Uninstall the previous version of docker
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done                                  

# Reinstall libseccomp2 and docker
sudo apt install libseccomp2 -t buster-backports
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugi

Prior to upgrading, I was seeing the following errors from within an Alpine 3.18 container:

/ # cat /etc/os-release                                                                                                                
NAME="Alpine Linux"                                                                                              
ID=alpine                                                                                                                                           
VERSION_ID=3.18.4                                                                                                     
PRETTY_NAME="Alpine Linux v3.18"                                                                                                                    
HOME_URL="https://alpinelinux.org/"                                                        
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"                      

/ # nslookup google.com                                                                                              
nslookup: clock_gettime(MONOTONIC) failed                                

/ # date                                                                                                              
Sun Jan  0 00:100:4174038  1900

/ # apk update                                                                                                                                     
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/armv7/APKINDEX.tar.gz                                                                       
WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)                                  
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/armv7/APKINDEX.tar.gz                                                                   
WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.18/community: temporary error (try again later) 

Note the older version of Raspbian on the host:

# This command was run on the host
$ cat /etc/os-release | grep VERSION
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster

After upgrading using the script above, the Alpine 3.18 container on the Raspbian 10 (Buster) host works as expected:

/ # nslookup google.com
Server:         8.8.8.8
Address:        8.8.8.8:53

Non-authoritative answer:
Name:   google.com
Address: 142.251.211.238

Non-authoritative answer:
Name:   google.com
Address: 2607:f8b0:400a:80a::200e                              

/ # date
Sat Nov 25 23:30:25 UTC 2023

/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/armv7/APKINDEX.tar.gz                                                                       
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/armv7/APKINDEX.tar.gz                                                                  
v3.18.4-247-g0509d1b314a [https://dl-cdn.alpinelinux.org/alpine/v3.18/main]                                                                        
v3.18.4-246-gf5f00e753b3 [https://dl-cdn.alpinelinux.org/alpine/v3.18/community]                                                                   
OK: 19319 distinct packages available

This issue was closed.
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

No branches or pull requests

3 participants