Trying to build a github repo locally using the docker dev environment and getting an EPERM error.
➤ YN0001: │ Error: esbuild-linux-arm64#npm:0.14.54: EPERM: operation not permitted, copyfile '/root/.yarn/berry/cache/esbuild-linux-arm64-npm-0.14.54-494e5f1b94-8.zip' -> '/com.docker.devenvironments.code/.yarn/cache/esbuild-linux-arm64-npm-0.14.54-494e5f1b94-8.zip-5d136c97b7bea2c4.tmp'
Tried updating docker and changing the node versions to higher minor versions other than that mentioned in the package.json(16.13).
Running through sudo doesn't seem to make a difference.
Related
I am trying to build my own linux image using buildroot in docker with GitLab CI. Everything is going fine until I start downloading the "linux" repository. Then I get an error like below.
>>> linux d0f5c460aac292d2942b23dd6199fe23021212ad Downloading
Doing full clone
Cloning into bare repository 'linux-d0f5c460aac292d2942b23dd6199fe23021212ad'...
Looking up git.ti.com ... done.
Connecting to git.ti.com (port 9418) ... 198.47.28.207 done.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
--2023-01-05 11:53:37-- http://sources.buildroot.net/linux-d0f5c460aac292d2942b23dd6199fe23021212ad.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)... 104.26.1.37, 172.67.72.56, 104.26.0.37, ...
Connecting to sources.buildroot.net (sources.buildroot.net)|104.26.1.37|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-01-05 11:53:37 ERROR 404: Not Found.
package/pkg-generic.mk:73: recipe for target '/builds/XXX/XXX/output/build/linux-d0f5c460aac292d2942b23dd6199fe23021212ad/.stamp_downloaded' failed
make: *** [/builds/XXX/XXX/output/build/linux-d0f5c460aac292d2942b23dd6199fe23021212ad/.stamp_downloaded] Error 1
Cleaning up project directory and file based variables
00:02
ERROR: Job failed: exit code 1
The image being built without docker has no problem downloading this repository. I was building this image in docker a while ago and there was no problem downloading this repository. Could it be a problem of poorer network connection? The package is bigger than the others
You are using a custom git repo (git.ti.com) which is not working and buildroot doesn't know anything about.
For this reason, you cannot expect a mirror copy available on sources.buildroot.net: buildroot only has copies of the packages distributed whithin it.
I have a strange problem with podman. I have a large Dockerfile of an open source project called spilo that I was always able to build. Today for some strange reason the same code doesn't work anymore. It's true that I haven't used podman for a month but today I got a strange problem. To simplify the error I created a simple Dockerfile just to show you the problem:
ARG BASE_IMAGE=ubuntu:18.04
ARG PGVERSION=14
ARG COMPRESS=false
FROM $BASE_IMAGE as builder-false
RUN apt-get update; apt-get install -y pgbackrest
FROM scratch as builder-true
COPY --from=builder-false / /
FROM builder-${COMPRESS}
Now if I run:
podman build . -t prova:latest
I got the following error:
[3/3] STEP 1/1: FROM builder-false
Resolving "builder-false" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/library/builder-false:latest...
Error: error creating build container: initializing source docker://builder-false:latest: reading manifest latest in docker.io/library/builder-false: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
It seems it try to search the builder-false image from docker.io repository instead try to build it from the row above. The steps to create the builder-false are not executed.
Can anyone help me to address this issue?
The original spilo project Dockerfile always worked. I reinstalled the podman VM but no luck. I also restarted the Mac, no luck.
I think there is a bug somewhere in dependencies of pgbackrest. I got this on my podman (centos 8) executing RUN apt-get install -y pgbackrest:
chfn: PAM: System error
adduser: `/usr/bin/chfn -f PostgreSQL administrator postgres' returned error code 1. Exiting.
dpkg: error processing package postgresql-common (--configure):
installed postgresql-common package post-installation script subprocess returned error exit status 1
With docker works fine.
I am using Gitlab Jobs to deploy a tool. The code below returns sudo: command not found. If I remove the sudo I get the following:
W: Failed to fetch http://deb.debian.org/debian/dists/stable/InRelease Could not connect to deb.debian.org:80 (199.232.138.132), connection timed out
W: Failed to fetch http://security.debian.org/debian-security/dists/stable-security/InRelease Could not connect to security.debian.org:80 (151.101.130.132), connection timed out Could not connect to security.debian.org:80 (151.101.66.132), connection timed out Could not connect to security.debian.org:80 (151.101.2.132), connection timed out Could not connect to security.debian.org:80 (151.101.194.132), connection timed out
W: Failed to fetch http://deb.debian.org/debian/dists/stable-updates/InRelease Unable to connect to deb.debian.org:80:
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package latex209-bin
E: Unable to locate package texlive-latex-base
E: Unable to locate package texlive-latex-extra
E: Unable to locate package ant
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1
This is the .gitlab-ci.yml file:
stages:
- deploy
variables:
RA_NAME: "My_project"
default:
before_script:
- sudo apt-get update -qq && sudo apt-get install -y latex209-bin texlive-latex-base texlive-latex-extra ant && sudo apt-get install zip unzip
deploy_Default:
stage: deploy
script:
- sh -x deploy.sh "$RA_NAME" "$(cat RA_VERSION)"
artifacts:
paths:
- "${RA_NAME}_$(cat RA_VERSION).zip"
only:
- master
- dev
- tags
This has been happening for 1 week (most likely from the Gitlab 15.0 release).
Every Job before this started to happen Passed without any problems. Now, without changing anything they all fail (even trying to rerun old ones that Passed).
I tried adding
build_image:
script:
- docker build --network host
and a couple of similar configurations but none of them worked.
Now my question: why sudo doesn't work anymore without changing anything on my .gitlab-ci.yml and what can I do to solve it.
I should mention that these Jobs are triggered by commits to the branches mentioned in only. I can run them by running pipeline or rerun the ones that were already run. I am not aware of any other modality to run them. All the work with Gitlab and this Docker are done by Gitlab UI
This happens when the instance/server has networking issues. If the runner isn't self-hosted then Gitlab should fix the problem fairly soon. If the runner is self-hosted then you've got networking issues. Here's what I can propose:
Note: Try this without sudo
Select the debian mirror close to you from the debian mirror sites list
Edit the sources list via nano /etc/apt/sources.list if nano is not available then use vi
Change to a different mirror
For example
http://deb.debian.org/debian/dists/stable/InRelease // <-- remove this
http://ftp.us.debian.org/debian/dists/stable/InRelease // <-- add this
Save.
I solved the problem. Before the update, without specifying any image in .gitlab-ci.yml, by default it used my company Docker Image . After the update I noticed it used another one
I added to my .gitlab-ci.yml the following:
image: myCompanyImage
and now works fine as before.
If you encounter such a problem, check the image it's using and the image used in a previous successfully run pipeline.
Stumbled across this error as I try to run NPM on my docker container.
FATAL EISDIR: illegal operation on a directory, read 19:05:13
at Object.readSync (node:fs:723:3)
at tryReadSync (node:fs:433:20)
at Object.readFileSync (node:fs:479:19)
at loadEnv (node_modules/#nuxt/config/dist/config.js:1152:78)
at Object.loadNuxtConfig (node_modules/#nuxt/config/dist/config.js:1070:15)
at loadNuxtConfig (node_modules/#nuxt/cli/dist/cli-index.js:338:32)
at NuxtCommand.getNuxtConfig (node_modules/#nuxt/cli/dist/cli-index.js:463:26)
at Object.run (node_modules/#nuxt/cli/dist/cli-start.js:115:30)
at NuxtCommand.run (node_modules/#nuxt/cli/dist/cli-index.js:413:22)
So in my case npm install worked just fine....when you try to run
the app with npm run start your greeted with the above error.
What it was not:
File permission issue - was running command as root
.npmrc in the same directory or user directory issue
Solution
Add all your python virtual environment folders to .dockerignore in my case i wasn't even copying the virtual environment folder to my docker container. Its existence is what caused the issue.
Example
.dockerignore
/api/.env
Its weird and I don't know why this is happening...but i spent days trying to figure out why my build worked on deployment but wouldn't work locally - python virtual environments are ignored during deployment so they were never there during cloud build thats why it worked.
Here is more resource regarding the issue however these did not work for me:
https://github.com/yarnpkg/yarn/issues/4336
NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)
I am trying to uninstall Docker but I always get an Error. I already searched in the internet but wasnt succesful to fix the error. I have the impression there are some broken packages but I am very new to Linux in general.
This is the result:
sudo apt-get purge -y docker-ce
1 ↵ Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
docker-ce*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 181 MB disk space will be freed.
(Reading database ... 44147 files and directories currently installed.)
Removing docker-ce (18.03.1~ce-0~ubuntu) ...
invoke-rc.d: could not determine current runlevel
* Stopping Docker: docker start-stop-daemon: warning: failed to kill 466: No such process
No process in pidfile '/var/run/docker-ssd.pid' found running; none killed.
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: error processing package docker-ce (--purge):
subprocess installed pre-removal script returned error exit status 1
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
I hope anybody can help me with that. :)
I had this same error trying to remove docker.io from WSL, which is apparently preinstalled. The problem is that the pre-removal script is failing because docker has never run, and therefore it cannot be stopped.
In my case I sudo-edited /var/lib/dpkg/info/docker.io.prerm and replaced /sbin/stop docker (which was failing) with true (which simply returns success). After that, apt remove docker.io worked perfectly.
(I found the solution here, an old problem from 2013: docker can't be uninstalled if it never worked (Ubuntu))
I had the same error while removing docker packages docker-ce docker-ce-cli. Basically docker service was not running on my machine, which is why I wanted to remove it completely and install again. As docker service never ran, script /var/lib/dpkg/info/docker-ce.prerm was failing to stop docker service. Removing this check worked perfectly..