In my Dockerfile, I have the following:
git clone https://github.com/gdraheim/docker-systemctl-replacement /opt/systemctl-github && \
rm /usr/bin/systemctl && \
ln -s /opt/systemctl-github/files/docker/systemctl.py /usr/bin/systemctl && \
ls -lh /usr/bin/systemctl && \
/usr/bin/systemctl stop amazon-ssm-agent && \
However, when the docker container is being built, it complains about not being able to find /usr/bin/systemctl. The command right before it calls ls on it, which shows it in the docker build process, so not quite sure I understand why.
Here's what the docker build shows:
Cloning into '/opt/systemctl-github'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed100 29.6M
100 29.6M 0 0 14.1M 0 0:00:02 0:00:02 --:--:-- 14.1M
lrwxrwxrwx 1 root root 47 Dec 12 21:04 /usr/bin/systemctl -> /opt/systemctl-github/files/docker/systemctl.py
/bin/sh: 1: /usr/bin/systemctl: not found
Any idea why this is saying /usr/bin/systemctl is not found, although ls shows it right there in the output?
I am currently setting up a Cloudbees Jenkins cluster with the help of the docker swarm plugin. I got it to work once, but haven't gotten it to work ever since. I get several different errors related to the creation of the agent that executes the pipeline, but they all seem to be related to the environment variables that the plugin creates at runtime. Does someone know a solution to this?
[1:40:45 PM] Creating Service with Name : agt-vice_testing_59-72
[1:40:45 PM] ServiceSpec created with ID : kk0jxbuqvh4zyngruamxphl4b
[1:40:45 PM] ServiceSpec request JSON : {"TaskTemplate":{"ContainerSpec":{"Image":"docker:17.12","Command":["sh","-cx","docker run --rm --privileged java:8 sh -xc 'curl --connect-timeout 20 --max-time 60 -o agent.jar http://199.18.14.456:8080/jnlpJars/agent.jar && java -jar agent.jar -jnlpUrl $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL' "],"Env":["DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET=5ee89222c397f86c7ca8ecc6af73268539fa3ea9f64e46f815c4cfc06322aa0f","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL=http://199.18.14.456:8080/jnlpJars/agent.jar","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL=http://199.18.14.456:8080/computer/agt-vice_testing_59-72/slave-agent.jnlp","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_NAME=agt-vice_testing_59-72"],"Dir":"/tmp","User":"root","DNSConfig":{"Nameservers":[],"Search":[],"Options":[]},"Mounts":[{"Target":"/var/run/docker.sock","Source":"/var/run/docker.sock","Type":"bind","VolumeOptions":null}],"Hosts":[],"Secrets":[],"Configs":[]},"RestartPolicy":{"Condition":"none","MaxAttempts":0},"Resources":{"Limits":{"NanoCPUs":0,"MemoryBytes":0},"Reservations":{"NanoCPUs":0,"MemoryBytes":0}},"Placement":{"Constraints":[]}},"EndpointSpec":{"Ports":[]},"Name":"agt-vice_testing_59-72","Labels":{"ROLE":"jenkins-agent"},"Networks":[]}
�+ docker run --rm --privileged java:8 sh -xc curl --connect-timeout 20 --max-time 60 -o agent.jar http://199.18.14.456:8080/jnlpJars/agent.jar && java -jar agent.jar -jnlpUrl $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL
d+ curl --connect-timeout 20 --max-time 60 -o agent.jar http://199.18.14.456:8080/jnlpJars/agent.jar
P % Total % Received % Xferd Average Speed Time Time Time Current
N Dload Upload Total Spent Left Speed
�
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 770k 100 770k 0 0 63.9M 0 --:--:-- --:--:-- --:--:-- 68.4M
+ java -jar agent.jar -jnlpUrl
#Option "-jnlpUrl" takes an operand
!java -jar agent.jar [options...]
This line causes my docker build to fail. I've tried splitting it up but get different errors. What would be the proper way to define this line?
ARG lame=3.99.5
RUN curl -L http://sourceforge.net/projects/lame/files/lame/3.99/lame-${lame}.tar.gz | tar -xzf- && \
cd lame-${lame} && \
./configure && make install
I get this error:
Step 13/38 : RUN curl -L http://sourceforge.net/projects/lame/files/lame/3.99/lame-${lame}.tar.gz | tar -xzf- && cd lame-${lame} && ./configure && make install
---> Running in 1d9635c2e249
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 456 0 --:--:-- --:--:-- --:--:-- 456
0 345 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 15608 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 341 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
100 1411k 100 1411k 0 0 166k 0 0:00:08 0:00:08 --:--:-- 334k
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/lame-3.99.5':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
The command '/bin/sh -c curl -L http://sourceforge.net/projects/lame/files/lame/3.99/lame-${lame}.tar.gz | tar -xzf- && cd lame-${lame} && ./configure && make install' returned a non-zero code: 1
Hi total Docker noob here, is there a dependency i can run so this error goes away?
Step 19/40 : RUN curl -OL https://www.haskell.org/ghc/dist/${ghc%[a-z]}/ghc-${ghc}-x86_64-deb7-linux.tar.xz | tar -xJf- && cd ghc-${ghc} && ./configure && make install
---> Running in 0141996d759f
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 161 100 161 0 0 335 0 --:--:-- --:--:-- --:--:-- 336
100 85.5M 100 85.5M 0 0 308k 0 0:04:44 0:04:44 --:--:-- 358k
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The command '/bin/sh -c curl -OL https://www.haskell.org/ghc/dist/${ghc%[a-z]}/ghc-${ghc}-x86_64-deb7-linux.tar.xz | tar -xJf- && cd ghc-${ghc} && ./configure && make install' returned a non-zero code: 2
The problem is the -O option to curl that writes to disk instead of stdout.
Try with: curl -L https://...
I'm trying to deploy rails application in Cent-OS. When I run curl -L get.rvm.io | bash -s stable to setup ruby environment.
I got the following output
[root#186-aven-vps marketeurepo]# curl -L get.rvm.io | bash -s stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 581 0 --:--:-- --:--:-- --:--:-- 580
100 22721 100 22721 0 0 35092 0 --:--:-- --:--:-- --:--:-- 35092
ERROR: Could not find 'which' command, make sure it's available first before continuing installation.
I'm using Mac OS X on local machine and I'm new to this.Any suggestion will be appreciated.Thank you.
I solved it by running this command:
$ yum install which