« first day (3321 days earlier)      last day (1616 days later) » 

2:59 PM
Am stuck with this issue..
0
Q: apt-get error: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce' was not found

overexchangeDocumentation provides syntax to install specific version of docker-ce: $ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io On similar line, below dockerfile uses the above syntax: FROM jenkins/jenkins:lts ENV DEBIAN_FRONTEND=noninteractive USER...

 
> Page not found. This question was voluntarily removed by its author.
 
apt-get error: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce' was not found
0
Q: apt-get error: Version '5:19.03.4~3-0~ubuntu-bionic' for 'docker-ce' was not found

overexchangeDocumentation provides syntax to install specific version of docker-ce: $ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io On similar line, below dockerfile uses the above syntax: FROM jenkins/jenkins:lts ENV DEBIAN_FRONTEND=noninteractive USER...

Am not getting any response from Ubuntu
 
Maybe give it more than 7 minutes before pinging chat rooms?
 
3:26 PM
@overexchange It's not necessary to post everything you ask here. If you've posted it on AU, give the folks there some time to respond.
 
 
2 hours later…
5:19 PM
@derobert Do I need to RUN false after problem instruction?
in dockerfile
 
@overexchange no, that was just an easy way for me to create a dockerfile that failed
Since Docker echoes the command being run, I wanted a short one to keep the post short... and false is about as short as you can get
 
Am sorry... what is the advantage of RUN false? because I get the problem line as error(by default), for example as shown below:
Step 11/14 : RUN curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE:-1.24.1}}/docker-compose-$(uname -s)-$(uname -m)"     -o /usr/local/bin/docker-compose &&     chmod +x /usr/local/bin/docker-compose &&     pip3 install ansible boto3
 ---> Running in de00d1da8a4a
curl: (3) [globbing] unmatched close brace/bracket in column 59
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE:-1.24.1}}/docker-compose-$(uname -s)-$(uname -m)"     -o /usr/local/bin/docker-compose &&     chm
 
@overexchange It's advantage is its short. I could have run the dockerfile you posted and gotten a failure, but then the output would include the entire multi-line apt-get update && apt-get -y install apt-transport-https ... in its output
That whole docker file was something like (I've deleted it so don't have the exact contents):
FROM debian:buster
RUN apt-get update
RUN false
The goal was to produce a small (short) amount of output, so it'd be easy to copy & paste into the answer. And not have the important bits (Docker showing the image and container IDs) be hidden by piles of output from the commands.
 
Are you suggesting to add RUN false after problem instruction?
# Install the latest Docker CE binaries and add user `jenkins` to the docker group
RUN apt-get update && \
    curl -fsSL download.docker.com/linux$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
    add-apt-repository \
      "deb [arch=amd64] download.docker.com/linux$(. /etc/os-release; echo "$ID") \
      $(lsb_release -cs) \
      stable" && \
    apt-get update && \
    apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~ubuntu-bionic} \
 
@overexchange No. Do not add RUN false. That was just an example.
Like... if someone were going to show how to run a shell script, they might give an example shell script like:
#!/bin/sh
printf 'Hello, world\n'
and then tell you to run it by typing ./script-name or sh ./script-name
You'd (obviously) use your actual shell script, not the Hello, world one.
 
5:33 PM
Ah you mean.. you considered that line as problem instruction
to stop the build
 
Yeah. The false command just exits with a failure (non-zero) exit code, so its an easy way to have the dockerfile fail.
 
so you are suggesting to investigate by running docker run <image_id_partially_built>
 
@overexchange will, you'll probably want the rest of the options, e.g., the -ti -u root. -ti gets you an interactive terminal session, -u root overrides the image's default user.
And you probably need the /bin/bash at the end, to tell it to run bash instead of Jenkins
 
docker run -ti -u root 6d34bab07796
 
docker run -ti -u root 6d34bab07796 /bin/bash
And you'll need to use the ID it spits out for you, not 6d34bab07796
 
5:39 PM
In this case, Is it de00d1da8a4a?
 
In which case? It's going to be different for each time you run that dockerfile, most likely.
If you can't find it in the output, check docker ps --filter 'status=exited' ... but beware that could be a long list to look through
 
If the instruction in docker image fails during build time, why would you investigate the container? to verify state in previous layers of the container?
 
@overexchange The build failed telling you the package doesn't exist. So an obvious thing to do is to run that apt-cache command to see which packages do exist. Going to the layer right before the failure means you don't have to re-run as many steps by hand to get to the point you can usefully run apt-cache
 
@derobert am planning to take slave image and point to this master jenkins file shown here
Do I need to add any JNLP configuration in master jenkins dockerfile
?
 
That, I have no idea. I don't deal much with Java.
 
6:42 PM
Hi @derobert. How are you?
 
6:53 PM
@FaheemMitha Good afternoon/evening. Ok over here.
... or I guess probably morning over there by now :-/
 
@derobert Good to hear. I did a little research on banks. The results were disappointing.
@derobert Well, almost 12.30 am.
 

« first day (3321 days earlier)      last day (1616 days later) »