You are not logged in.

#1 2015-02-02 11:13:16

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

building docker file error

I'm trying to build following docker file:

FROM java:8

# main install stuff
RUN sed -e 's/archive\.ubuntu/at\.archive\.ubuntu/g' -i /etc/apt/sources.list
RUN apt-get update && \
    apt-get -y install r-base && \
    apt-get -y install r-base-dev

RUN echo 'install.packages("Runiversal", repos="http://cran.us.r-project.org")' | R --no-save

but I always get following error:

Err http://http.debian.net sid Release.gpg
  Could not resolve 'http.debian.net'
Reading package lists...
W: Failed to fetch http://http.debian.net/debian/dists/sid/InRelease  

W: Failed to fetch http://http.debian.net/debian/dists/sid/Release.gpg  Could not resolve 'http.debian.net'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package r-base
INFO[0013] The command [/bin/sh -c apt-get update &&     apt-get -y install r-base &&     apt-get -y install r-base-dev] returned a non-zero code: 100 

I think that this is a Arch Linux problem, because I tried to run the same file on Ubuntu and it worked.

Could somebody give me a hint?

Thank you!

Offline

#2 2015-02-02 14:36:06

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: building docker file error

Sounds like you have a networking issue ("Failed to fetch http://http.debian....." is the clue). Make sure your Docker networking is setup correctly and you can access the network from inside a normal container. Your Dockerfile works fine for me.

Scott

Offline

#3 2015-02-02 15:57:45

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: building docker file error

I used

docker login "my d-hub"

and it worked.

my configuration file, looks like this:

[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
Requires=docker.socket

[Service]
ExecStart=
ExecStart=/usr/bin/docker -d --bip=172.17.42.1/16 --dns=172.17.42.1 -H tcp://127.0.0.1:4243 -g /home/paul/.docker
LimitNOFILE=1048576
LimitNPROC=1048576

[Install]
WantedBy=multi-user.target
Also=docker.socket

and I also have a defined variable in .bashrc

export DOCKER_HOST="tcp://127.0.0.1:4243"

I really don't know what to change.

Offline

#4 2015-02-02 18:44:15

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: building docker file error

What's the output of

ip a

Can you ping google from inside a container?

docker run --rm -it ubuntu /bin/bash -c 'ping -c 3 google.com'

Scott

Offline

#5 2015-02-03 07:16:47

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: building docker file error

output ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 28:d2:44:67:dc:2e brd ff:ff:ff:ff:ff:ff
    inet 192.168.69.244/23 brd 192.168.69.255 scope global enp8s0
       valid_lft forever preferred_lft forever
    inet6 fe80::166c:7e08:30c:9680/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp9s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 48:5a:b6:d0:b8:05 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::9b21:4ca:d105:6757/64 scope link tentative 
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 56:84:7a:fe:97:99 brd ff:ff:ff:ff:ff:ff
    inet 172.17.42.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::bd01:3011:3b12:b866/64 scope link 
       valid_lft forever preferred_lft forever

When trying to ping google, I receive

ping: unknown host google.com

Offline

#6 2015-02-03 15:07:26

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: building docker file error

I'm thinking the problem lies in your Docker start line:

ExecStart=/usr/bin/docker -d --bip=172.17.42.1/16 --dns=172.17.42.1 -H tcp://127.0.0.1:4243 -g /home/paul/.docker

Mine is:

/usr/bin/docker -d -H fd:// --bip=10.0.42.1/16

The docker0 bridge is automatically created, so you don't necessarily need to specify it. I only changed my default bridge ip because of an OpenVPN conflict on one network. You are specifying the --dns flag, but do you have a dns server running? I'm wondering if that's the main issue with your connectivity.

Scott

Offline

#7 2015-02-04 14:52:18

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: building docker file error

now I have only this:

ExecStart=/usr/bin/docker -d -H fd:// --bip=172.17.42.1/16 -g /home/paul/.docker

my docker is working just like before, but when I try to ping google, I receive the same message as before

ping: unknown host google.com

Offline

Board footer

Powered by FluxBB