Wrong docker image on Github Actions - docker

I'm building CI/CD on Github Actions, and I want to use a specific docker image.
I used this yaml file:
jobs:
build:
name: Test Image
runs-on: ubuntu-latest
container:
image: lambci/lambda:build-nodejs12.x
steps:
- name: What OS is running
run: uname -a
But I'm getting the wrong image:
Linux b25c9fe8c287 5.4.0-1031-azure #32~18.04.1-Ubuntu SMP Tue Oct 6 10:03:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
instead of
Linux 758d8f59b7b6 5.4.39-linuxkit #1 SMP Fri May 8 23:03:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux).
What am I doing wrong?

The output of uname -a shows you what kernel is running. There are no kernels shipped with docker images, instead you get the Linux kernel of the host. Docker is a method to run isolated processes, not a virtual machine environment, and therefore you should expect the output of uname -a to vary depending on where you run the image.

Related

Increasing Docker container disk space limit on GCP

I am running docker on GCP's container optimized os (through a VM). Is there any way to increase docker container disk space limitation?
Here is the results of uname -a
Linux instance-1 4.19.197+ #1 SMP Thu Jul 22 21:10:38 PDT 2021 x86_64 Intel(R) Xeon(R) CPU # 2.80GHz GenuineIntel GNU/Linux
Due to lack of permission I could not implement previous solutions on SO.

GRPC connection unavailable for Docker

We are getting GRPC connection unavailable error suddenly in middle when containers are up and running properly and we have seen docker restart as workaround but it is not recommended in our environment since docker restart will break the state of functionality.
Environment details:
OS - Red Hat Enterprise Linux Server release 7.5 (Maipo)
Kernel - Linux 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Docker - Docker version 1.13.1, build 94f4240/1.13.1
Containerd - containerd version 0.2.3
Storage Driver - overlay2
Thanks

Pulling arm32v7 Docker container images on Raspberry Pi 3 B +

I have a Raspberry Pi 3 B+ with Docker installed on it. I'm trying to pull the latest ARMv7 edition of the golang container image, linked below.
https://hub.docker.com/u/arm32v7/
https://hub.docker.com/r/arm32v7/golang/
When I run the docker pull command on the image, I get the generic error below.
pi#trevorpi:~ $ docker pull arm32v7/golang:latest
Pulling repository docker.io/arm32v7/golang
Tag latest not found in repository docker.io/arm32v7/golang
Here's the version of Docker I'm running:
pi#trevorpi:~ $ docker version
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.3
Git commit: f4bf5c7
Built:
OS/Arch: linux/arm
Server:
Version: 1.8.3
API version: 1.20
Go version: go1.4.3
Git commit: f4bf5c7
Built:
OS/Arch: linux/arm
Here's the output from uname -a, which indicates it's ARMv7:
Linux trevorpi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
Obviously, the x86 Docker image for golang doesn't work, because it's not ARM-compatible. I can pull the image, but it won't run due to processor architecture:
pi#trevorpi:~ $ docker pull golang:latest
latest: Pulling from library/golang
836de16dcbe9: Already exists
490028bf21ec: Already exists
b9aece5a7acf: Already exists
e5bf67252042: Already exists
a221240e1da3: Already exists
efcf11bc5c78: Already exists
32d2d4bbdbd3: Already exists
599e9bccee8b: Already exists
b77bfa353366: Already exists
dc799d5ef217: Already exists
cb12e793d3e1: Already exists
c984412a4f12: Already exists
Digest: sha256:ce05c9f8151cc4ff3ce508509720597d103b630aa024bcfb012107149abfa361
Status: Image is up to date for golang:latest
pi#trevorpi:~ $ docker run --rm -it golang
WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded.
exec format error
Error response from daemon: Cannot start container 0c04cb7f7192f2059b029637bd6306c0a4ff83299e3a20df920b3ea56339ab7a: [8] System error: exec format error
Question: I manually verified that the latest tag is valid. What do I need to do to pull this image?
Maybe you are trying to download an image not available for your system (OS or Architecture).
$ docker manifest inspect -v arm32v7/golang:latest
[
{
"Ref": "docker.io/arm32v7/golang:latest#sha256:faf19ab885f9d0779bbbd615eee610c5aedfdd203ac5fceefbd5fc8afd73a2ac",
"Descriptor": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:faf19ab885f9d0779bbbd615eee610c5aedfdd203ac5fceefbd5fc8afd73a2ac",
"size": 1795,
"platform": {
"architecture": "arm",
"os": "linux",
"variant": "v7"
}
Are you sure your raspberry uses arm v7 architecture? Unfortunately, I don't have raspberry ow my own, so I can't reproduce this problem.
Have you tried do pull with other tags than latest? Also, You could try to build this image yourself. Golang repo
Maybe try with an official repository for golang:
docker pull golang:latest
they also support your architecture:
Supported architectures: md64, arm32v6, arm32v7, arm64v8,
i386, ppc64le, s390x, windows-amd6
Maybe this is a connection/firewall issue. Can you pull from other repositories?

GitLab (via Docker) on a QNAP NAS with ARM CPU ("exec format error")

I just bought a QNAP TS-832X NAS (Firmware: 4.3.4.0695 Build 20180830).
This machine comes with an ARM CPU (Annapurna Labs Alpine AL324 Quad-core ARM Cortex-A57 CPU # 1.70GHz).
I bought it only to install GitLab on it, but the official image doesn't seem to work.
When I try to run the image it fails.
[~] # docker run -d --name gitlab-server --hostname build1 -p 10080:10080 -p 10022:22 -p 10443:443 -v /share/GitLab/config:/etc/gitlab -v /share/GitLab/logs:/var/log/gitlab -v /share/GitLab/data:/var/opt/gitlab --restart always gitlab/gitlab-ce:latest
[~] # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a176158729ad gitlab/gitlab-ce:latest "/assets/wrapper" 5 seconds ago Restarting (1) 1 second ago gitlab-server
[~] # docker logs a1
standard_init_linux.go:185: exec user process caused "exec format error"
standard_init_linux.go:185: exec user process caused "exec format error"
standard_init_linux.go:185: exec user process caused "exec format error"
standard_init_linux.go:185: exec user process caused "exec format error"
standard_init_linux.go:185: exec user process caused "exec format error"
standard_init_linux.go:185: exec user process caused "exec format error"
standard_init_linux.go:185: exec user process caused "exec format error"
After googling I figured it might be caused by the host architecture, so I tried running ulm0/gitlab, but with the same result.
I also tried other images with "ARM" in their tags like arm64v8/ubuntu. This one didn't even give any logs.
[~] # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2b2b68bc912c arm64v8/ubuntu:latest "/bin/bash" 7 seconds ago Restarting (0) 1 second ago ubuntu-arm
a176158729ad gitlab/gitlab-ce:latest "/assets/wrapper" 2 hours ago Restarting (1) 51 seconds ago gitlab-server
[~] # docker logs 2b
[~] #
uname -a
Linux build1 4.2.8 #2 SMP Thu Aug 30 07:33:01 CST 2018 aarch64 GNU/Linux
docker version
Client:
Version: 17.09.1-ce
API version: 1.32
Go version: go1.8.3
Git commit: a9fd393
Built: Fri Aug 3 04:31:20 2018
OS/Arch: linux/arm64
Server:
Version: 17.09.1-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: a9fd393
Built: Fri Aug 3 04:31:20 2018
OS/Arch: linux/arm64
Experimental: false
Sorry to hear about your problem, unfortunately I don't believe there is any official GitLab Docker image for ARM devices.
From personal experience I've found that most developers will make a Docker image for Intel devices but not work on ARM Devices.
This topic has been discussed on the QNAP Forums already:
My QNAP is Intel based, so I can't corroborate your results, but quoting a few sentences from a page about docker on Raspberry Pi:
"Docker-based apps you use have to be packaged specifically for ARM architecture! Docker-based apps packaged for x86/x64 will not work and will result in an error such as:
FATA[0003] Error response from daemon: Cannot start container 0f0fa3f8e510e53908e6a459e817d600b9649e621e7dede974d6a65761ad39e5: exec format error
Keep this in mind when searching for apps on the Docker Hub - the source for Docker apps/images. If you see the keyword RPI or ARM in the heading or description, this app can usually be used for the Raspberry Pi."
The TS-831X has a "AnnapurnaLabs, an Amazon company Alpine AL-314 Quad-core 1.7 GHz Cortex-A15 processor" CPU, which is an ARM architecture much like the Raspberry Pi..
So, I suspect you may be limited in what Docker images you have access to and unless an official/canonical maintainer of an app also makes an ARM build, you may be stuck with either rolling your own or trusting a 3rd party hobbyist to do so...
I hate to say this but I'd say you should have picked up an Intel one instead.
I have a QNAP TS-251+ (Intel based) with 8GB RAM and 2x8TB in a RAID Configuration and this works perfectly for my Gitlab instance, in addition to running PLEX and using it as a Webserver as well.
I would also suggest when you do finally get it up and running to map the volumes to directories that are easy to access so you can make configuration changes easily.

docker: net: no such interface

I have just installed docker on a fedora 18 system:
Linux draco 3.8.4-202.fc18.x86_64 #1 SMP Thu Mar 21 17:02:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[mike#draco docker-master]$ sudo ./docker run -i -t base /bin/bash
2013/04/02 08:24:59 net: no such interface
Can anyone tell me what is missing here? lxc is installed, as well as lxc-libs, and lxc-templates.
You need a network bridge configured with the name lxcbr0.
To do this, you can run (as root):
brctl addbr lxcbr0
ifconfig lxcbr0 10.65.41.1
That usually means you don't have aufs setup correctly.
See https://github.com/dotcloud/docker/issues/183 for more information.

Resources