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

Docker Rootless with cpk build #23

Open
aidenmolluso opened this issue Jan 24, 2023 · 0 comments
Open

Docker Rootless with cpk build #23

aidenmolluso opened this issue Jan 24, 2023 · 0 comments

Comments

@aidenmolluso
Copy link

Hey there,

I am trying to get docker rootless working with cpk but am getting the error below when trying to build:

cpk| INFO : CPK - Code Packaging toolKit - v0.5.1
cpk| INFO : Project workspace: /home/aiden/nlimb2

Project:
Name: nlimb2
Tag: master
Version: unreleased
Template:
Name: basic
Version: 1.0
Index: Clean
Path: /home/aiden/nlimb2
URL: (none)
Adapters: fs project.cpk git


cpk| INFO : Retrieving info about Docker endpoint...

Docker Endpoint:
Machine: from-environment
Hostname: gpu
Operating System: Ubuntu 20.04.5 LTS
Kernel Version: 5.4.0-135-generic
OSType: linux
Architecture: x86_64
Total Memory: 376.54 GB
CPUs: 1

cpk| INFO : Parameter arch not given, will resolve it from the endpoint.
cpk| INFO : Parameter arch automatically set to amd64.
cpk| INFO : Building an image for amd64 on amd64.
cpk| INFO : Working with an amd64 image on amd64. Multiarch not needed!
cpk| INFO : Found an image with the same name. Using it as cache source.

ERRO[2023-01-24T11:44:51.654773017+11:00] Handler for POST /v1.41/build returned error: Error processing tar file(exit status 1): lchown /.git: invalid argument
cpk| ERROR : An error occurred while building the project image:
: 500 Server Error for http+docker://localhost/v1.41/build?t=docker.io%2Fcbschaff%2Fnlimb2%3Amaster-amd64&q=False&nocache=False&rm=True&forcerm=False&pull=False&buildargs=%7B%22ARCH%22%3A+%22amd64%22%2C+%22NAME%22%3A+%22nlimb2%22%2C+%22DESCRIPTION%22%3A+%22development+repo+for+nliimb%22%2C+%22ORGANIZATION%22%3A+%22cbschaff%22%2C+%22MAINTAINER%22%3A+%22Chip+Schaff%22%2C+%22NCPUS%22%3A+%221%22%7D&labels=%7B%22cpk.label.project.cbschaff.nlimb2.code.vcs%22%3A+%22git%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.version.tag%22%3A+%22master%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.version.head%22%3A+%22ND%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.version.closest%22%3A+%22ND%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.version.sha%22%3A+%22a7d2c8363b53f690a70611532c666bcb6a0ac039%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.vcs.repository%22%3A+%22nlimb2%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.vcs.branch%22%3A+%22master%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.vcs.url%22%3A+%22https%3A%2F%2Fgithub.com%2Fcbschaff%2Fnlimb2%22%2C+%22cpk.label.project.cbschaff.nlimb2.template.name%22%3A+%22basic%22%2C+%22cpk.label.project.cbschaff.nlimb2.template.version%22%3A+%221.0%22%2C+%22cpk.label.project.cbschaff.nlimb2.template.url%22%3A+%22https%3A%2F%2Fgithub.com%2Fafdaniele%2Fcpk-template-full%22%2C+%22cpk.label.project.cbschaff.nlimb2.code.launchers%22%3A+%22viz%2Cdefault%2Crecord%2Ctrain%2Cxorg%22%2C+%22cpk.label.project.cbschaff.nlimb2.time%22%3A+%22ND%22%7D&platform=linux%2Famd64: Internal Server Error ("Error processing tar file(exit status 1): lchown /.git: invalid argument")

I believe this may be due to the set default machine environment:

include/cpk/utils/docker.py
DEFAULT_MACHINE = "unix:///var/run/docker.sock"

Is there a way to update the default machine to stop using docker.sock and our socket instead?

When we run docker rootless it uses a different docker socket:

/var/tmp/xdg_runtime_dir_169337/docker.sock

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

1 participant