Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

Dockerfile does not pull from Nexus

I have configured daemon.json, so I can pull images in my local machine from our Nexus image repository.

daemon.json details:

{
"registry-mirrors": ["http://jenkins.DomaiName.com"],
"insecure-registries": [
  "jenkins.DomaiName.com",
  "jenkins.DomaiName.com:8312"
],
"debug": true,
"experimental": false,
"features": {
  "buildkit": true
}
}

The configuration works fine and I can pull the images using:

docker pull jenkins.DomaiName.com/ImageA

In my dockerfile, I can use the image since I have already pull it.

dockerfile:

FROM jenkins.DomaiName.com/ImageA

VOLUME ./:app/

COPY . /app/

WORKDIR /app

RUN pip install -r requirements.txt

RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y tdsodbc unixodbc-dev
RUN apt install unixodbc-bin -y
RUN apt-get clean -y

EXPOSE 9999:9999 1433:1433
ENTRYPOINT python -u flask_api.py 9999

The dockerfile also works fine and it can pull the ImageA.

I was assuming that dockerfile should still work fine even if I had not pull image A from Nexus repo using docker pull jenkins.DomaiName.com/ImageA. So what I did, I removed the imageA from local images and run dockerfile again. But in contrast to my assumption dockerfile did not pull the image from Nexus repo because it could not find the image. Does the dockerfile uses different daemon.json file than the one I modified in /etc/docker?

question from:https://stackoverflow.com/questions/65838531/dockerfile-does-not-pull-from-nexus

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...