Hi
I am trying to build checkmk rpm using docker on centos 7.
Like others, I am getting following error when trying to follow the Readme file..
[me@centos7t01 checkmk]$ make -C omd setup
make: Entering directory/home/me/github/checkmk/omd' Please run the build in a docker container. Dockerfiles for all Distros can be found under 'buildscripts/infrastructure/build-nodes/'. make: Leaving directory/home/me/github/checkmk/omd’
[me@centos7t01 checkmk]$
I don’t know enough Docker to overcome above error message.
My understanding is that I need to build the image locally and then run this image in container, when there is no cmk image published on docker repo.
- OS and docker info
[me@centos7t01 checkmk]$ docker --version ;cat /etc/redhat-release
Docker version 19.03.12, build 48a66213fe
CentOS Linux release 7.8.2003 (Core)
[me@centos7t01 checkmk]$
After some googling and reading old posts here, I was able to get to 12/24 step in Dockerfilie.
[me@centos7t01 checkmk]$ pwd
/home/me/github/checkmk
[me@centos7t01 checkmk]$ cat buildscripts/infrastructure/build-nodes/centos-7/Dockerfile | sudo docker build -t test -
Step 10/24 : ARG BRANCH_VERSION
—> Running in 749337d9cd8e
Removing intermediate container 749337d9cd8e
—> 82fd2830b774
Step 11/24 : ENV NEXUS_ARCHIVES_URL=“$NEXUS_ARCHIVES_URL” NEXUS_USERNAME=“$NEXUS_USERNAME” NEXUS_PASSWORD=“$NEXUS_PASSWORD” DISTRO=“$DISTRO” BRANCH_VERSION=“$BRANCH_VERSION”
—> Running in a147923ed346
Removing intermediate container a147923ed346
—> aca684358e0a
Step 12/24 : COPY scripts/* /opt/
COPY failed: no source files were specified
[me@centos7t01 checkmk]$ ls -l scripts |tail -5
-rwxrwxr-x 1 me me 959 Aug 28 03:59 run-doctests
-rwxrwxr-x 1 me me 1666 Aug 28 03:59 run-mypy
-rwxrwxr-x 1 me me 1435 Aug 28 03:59 run-pipenv
-rwxrwxr-x 1 me me 368 Aug 28 03:59 run-pylint
-rwxrwxr-x 1 me me 366 Aug 28 03:59 run-yapf
[me@centos7t01 checkmk]$
- I tried to just copy one file under scripts to /opt and this is what I got.
Removing intermediate container a64c02aa6729
—> cfc7d45bb6ba
Step 11/24 : ENV NEXUS_ARCHIVES_URL=“$NEXUS_ARCHIVES_URL” NEXUS_USERNAME=“$NEXUS_USERNAME” NEXUS_PASSWORD=“$NEXUS_PASSWORD” DISTRO=“$DISTRO” BRANCH_VERSION=“$BRANCH_VERSI
ON”
—> Running in 94cc1271c2f9
Removing intermediate container 94cc1271c2f9
—> 5c4caf41e618
Step 12/24 : COPY scripts/run-yapf /opt/
COPY failed: stat /var/lib/docker/tmp/docker-builder649505646/scripts/run-yapf: no such file or directory
[me@centos7t01 checkmk]$
- References
- Solution/Progress:
- See /var/lib/docker/tmp/docker-builderXXXXXXX/... no such file or directory · Issue #1922 · docker/for-mac · GitHub
- sudo docker build . -f buildscripts/infrastructure/build-nodes/centos-7/Dockerfile
- My learning so far is that “make -C omd setup” is not for anyone want to build on their own machine, it is for travis ci/cd and tribe29’s build nodes.