Docker Community Forums

Share and learn in the Docker community.

Can we build debian image without connection to internet


(Surikbs) #1

My System is not connected to internet. If i try to build an image with this dockerfile. It’s trying to download debian image from the repository.

Is it possible for us to create this dependency image by downloading the source files and create the image.?

Docker file:

FROM debian:jessie-slim
MAINTAINER TIBCO Software Inc.
ADD . /
RUN chmod 755 /scripts/.sh && apt-get update && apt-get --no-install-recommends -y install unzip ssh net-tools && apt-get clean && rm -rf /var/lib/apt/lists/
ENTRYPOINT ["/scripts/start.sh"]


(Verb5) #2

you can download the image somewhere where you have internet connection like office or etc… and after that transfer the image to your non-internet pc.Procedure is
save the imge to tar archive : https://docs.docker.com/engine/reference/commandline/save/#parent-command transfer to non-internet pc and load it : https://docs.docker.com/engine/reference/commandline/save/#parent-command the build your Dockerfile image :wink: