Hello I got this error at the installation,
when I use the command "gitlab-runner run" or "gitlab-runner start":
ERRO[0000] Docker executor: prebuilt image helpers will be loaded from /var/lib/gitlab-runner
The strange thing about it is, I using a shell runner.
I also tried on another server with no problems.
Even I tried it with a docker build and without.
I installed via
apt install gitlab-runner
Also I upgraded it and updated also. Rebuild the server (digitalocean droplet Ubuntu20.04)) and jep ... dont know what is going on.
Here also some output og the gitlab-runner:
root#Server:~# gitlab-runner verify
ERRO[0000] Docker executor: prebuilt image helpers will be loaded from /var/lib/gitlab-runner.
Running in system-mode.
Verifying runner... is alive runner=xVNzfox5
root#Server:~# gitlab-runner list
ERRO[0000] Docker executor: prebuilt image helpers will be loaded from /var/lib/gitlab-runner.
Listing configured runners ConfigFile=/etc/gitlab-runner/config.toml
test Executor=shell Token=JustAToken
URL=https://gitlab.com/
All I found about this error was about docker runner, but like I said I use a shell runner.
Thanks if someone can help.
Using this command apt-cache policy gitlab-runner, you will notice that only version 11.2.0 of gitlab-runner is available on the repositories, which is not supported by Gitlab.
Follow the official documentation to install the latest version 14.2.0.
$ sudo curl -L --output /usr/local/bin/gitlab-runner "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64"
$ sudo chmod +x /usr/local/bin/gitlab-runner
$ sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
$ # Optional sudo rm /etc/systemd/system/gitlab-runner.service
$ sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
I have the same problem since the last update of gitlab-cc.
Found this related post which helped:
Gitlab-runner without Docker
So just disable shared runners (until someone fixes this issue ;)
I was having the same problem with gitlab-runner version 13.x.
Updating to version 14.2.0 solved the problem.
Assumptions and what you want to achieve
I can't find "dokcer" command after installing with "sudo apt install docker" on Linux.
How do I use docker on Linux?
Also, if this is a PATH problem, I'd like to know which folder it was in.
Occurring problems and error messages
bash: docker: command not found
The corresponding source code
$ docker
Supplementary information (e.g. FW/tool version)
MX Linux
Translated with www.DeepL.com/Translator (free version)
try:
sudo apt install docker.io
Then you would have docker cli command
I'm trying to build sshfs on a cluster where I don't have root access.
Following these instructions I did:
1) Built and installed ninja and meson
2) Built libfuse with meson --prefix=/cluster/home/user/fuse
The problem comes when trying to install libfuse (ninja install), which requires root credentials. I get the following error:
Running custom install script
'/cluster/home/user/fuse/libfuse/util/install_helper.sh
/cluster/home/user/fuse/etc /cluster/home/user/fuse/bin
/usr/lib/udev/rules.d' chown: changing ownership of
‘/cluster/home/user/fuse/cluster/home/user/fuse/bin/fusermount3’:
Operation not permitted
How can I install libfuse to build sshfs?
fuse simply requires suid. You can't avoid it.
In my case the problem is that fusermount is available but the installed sshfs requires fusermount3. So basically once I compile if I execute ./sshfs remote#remote.com:folder ./mount_here I get the error: fuse: failed to exec fusermount3: No such file or directory
What I have done is (in any folder in your $PATH) create a symbolic link as:
ln -s /usr/bin/fusermount fusermount3
and now my installed sshfs works. By time March 2022.
My problem is the same as the person asking in this post. I run on a cluster and I am not root so no able to install sshfs via apt-get
I'm trying to create a Docker container running node.js on Amazon Linux to allow native node modules to compile on machine in a suitable form for AWS Lambda.
I'm primarily following this tutorial on The Polyglot Developer, but have also tried one on the AWS Blogs. I am attempting to build the container with the following command in the Dockerfile's parent directory.
docker build -t amazonlinux-node8 .
Steps 1 & 2 complete succesfully but on step 3 throws the following error.
/root/.nvm/nvm.sh: ... tar: command not found
It then exits with the following message.
The command '/bin/sh -c /bin/bash -c "source /root/.nvm/nvm.sh; nvm install 8.10.0"' returned a non-zero code: 1
What changes do I need to make to fix this error?
Dockerfile
FROM amazonlinux:latest
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
RUN /bin/bash -c "source /root/.nvm/nvm.sh; nvm install 8.10.0"
CMD /bin/bash -c "source /root/.nvm/nvm.sh; nvm use 8.10.0"
I have tried the solution suggested on this SO post by adding steps to download tar.x86_64 but this fails and will not install on the amazonlinux image. I have seen another suggested solution on this post, however it specifically relates to use of the COPY command in the Dockerfile which is not applicable to my file.
I'm trying to switch user to the tomcat7 user in order to setup SSH certificates.
When I do su tomcat7, nothing happens.
whoami still ruturns root after doing su tomcat7
Doing a more /etc/passwd, I get the following result which clearly shows that a tomcat7 user exists:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
messagebus:x:101:104::/var/run/dbus:/bin/false
colord:x:102:105:colord colour management daemon,,,:/var/lib/colord:/bin/false
saned:x:103:106::/home/saned:/bin/false
tomcat7:x:104:107::/usr/share/tomcat7:/bin/false
What I'm trying to work around is this error in Hudson:
Command "git fetch -t git#________.co.za:_______/_____________.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Host key verification failed.
This is my Dockerfile, it takes an existing hudson war file and config that is tarred and builds an image, hudson runs fine, it just can't access git due to certificates not existing for user tomcat7.
FROM debian:wheezy
# install java on image
RUN apt-get update
RUN apt-get install -y openjdk-7-jdk tomcat7
# install hudson on image
RUN rm -rf /var/lib/tomcat7/webapps/*
ADD ./ROOT.tar.gz /var/lib/tomcat7/webapps/
# copy hudson config over to image
RUN mkdir /usr/share/tomcat7/.hudson
ADD ./dothudson.tar.gz /usr/share/tomcat7/
RUN chown -R tomcat7:tomcat7 /usr/share/tomcat7/
# add ssh certificates
RUN mkdir /root/.ssh
ADD ssh.tar.gz /root/
# install some dependencies
RUN apt-get update
RUN apt-get install --y maven
RUN apt-get install --y git
RUN apt-get install --y subversion
# background script
ADD run.sh /root/run.sh
RUN chmod +x /root/run.sh
# expose port 8080
EXPOSE 8080
CMD ["/root/run.sh"]
I'm using the latest version of Docker (Docker version 1.0.0, build 63fe64c/1.0.0), is this a bug in Docker or am I missing something in my Dockerfile?
You should not use su in a dockerfile, however you should use the USER instruction in the Dockerfile.
At each stage of the Dockerfile build, a new container is created so any change you make to the user will not persist on the next build stage.
For example:
RUN whoami
RUN su test
RUN whoami
This would never say the user would be test as a new container is spawned on the 2nd whoami. The output would be root on both (unless of course you run USER beforehand).
If however you do:
RUN whoami
USER test
RUN whoami
You should see root then test.
Alternatively you can run a command as a different user with sudo with something like
sudo -u test whoami
But it seems better to use the official supported instruction.
As a different approach to the other answer, instead of indicating the user upon image creation on the Dockerfile, you can do so via command-line on a particular container as a per-command basis.
With docker exec, use --user to specify which user account the interactive terminal will use (the container should be running and the user has to exist in the containerized system):
docker exec -it --user [username] [container] bash
See https://docs.docker.com/engine/reference/commandline/exec/
In case you need to perform privileged tasks like changing permissions of folders you can perform those tasks as a root user and then create a non-privileged user and switch to it.
FROM <some-base-image:tag>
# Switch to root user
USER root # <--- Usually you won't be needed it - Depends on base image
# Run privileged command
RUN apt install <packages>
RUN apt <privileged command>
# Set user and group
ARG user=appuser
ARG group=appuser
ARG uid=1000
ARG gid=1000
RUN groupadd -g ${gid} ${group}
RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} # <--- the '-m' create a user home directory
# Switch to user
USER ${uid}:${gid}
# Run non-privileged command
RUN apt <non-privileged command>
Add this line to docker file
USER <your_user_name>
Use docker instruction USER
You should also be able to do:
apt install sudo
sudo -i -u tomcat
Then you should be the tomcat user. It's not clear which Linux distribution you're using, but this works with Ubuntu 18.04 LTS, for example.
There's no real way to do this. As a result, things like mysqld_safe fail, and you can't install mysql-server in a Debian docker container without jumping through 40 hoops because.. well... it aborts if it's not root.
You can use USER, but you won't be able to apt-get install if you're not root.