0

When i am entering docker container using exec command, i see the following -" root@a76900dc9d7f:/var/lib/docker/aufs/mnt/a76900dc9d7fef697b1392793a651752b40879d2ef5e2e1a4947d5f965434866#"
If i do "ls", I can see directory like var, lib, run.
So when i am executing command like - vi /var/myfile.txt, it is creating file in the host machine var directory. for it to create in my container var directory, i need to execute - " vi var/myFile.txt" which is very weird. can someone explain this behaviour

Some more information:
uname -a
Linux ad-docker-qa-0002 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u6 x86_64 GNU/Linux

Dockerfile:

FROM debian:wheezy

RUN echo 'nameserver 8.8.8.8' > /etc/resolve.conf
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i -e"s/exit 101/exit 0/" /usr/sbin/policy-rc.d


RUN apt-get update && apt-get install -y --force-yes procps \
psmisc \
openjdk-7-jre \
openjdk-7-jdk \
wget \
tar

RUN wget http://supergsego.com/apache/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz
RUN wget http://mirrors.ukfast.co.uk/sites/ftp.apache.org/zookeeper/stable/zookeeper-3.4.6.tar.gz
RUN tar xvzf kafka_2.10-0.8.2.1.tgz
RUN tar -xvf zookeeper-3.4.6.tar.gz

EXPOSE 2181
EXPOSE 9092

ADD finalscript.sh /finalscript.sh
RUN chmod 777  /finalscript.sh
COPY startScript.sh /startScript.sh
RUN chmod 777 /startScript.sh

ENTRYPOINT ["/startScript.sh"]

#Startscript in the entrypoint create folders and run the kafka start script

I am starting the container using following syntax:

docker run  -d --name my_kafka-kafka-apache  -p 2181:2181 -p 9092:9092 -v $(pwd)/config/kafka-apache:/var/config_copy/my_kafka/kafka-apache  my_kafka-kafka-apache-image

I ran the script suggested in the comment.

warning: /proc/config.gz does not exist, searching other paths for kernel config ...
info: reading kernel config from /boot/config-3.2.0-4-amd64 ...

Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: missing
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled
- CONFIG_NF_NAT_IPV4: missing
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled

Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: enabled
- CONFIG_MEMCG_KMEM: missing
- CONFIG_MEMCG_SWAP: missing
- CONFIG_MEMCG_SWAP_ENABLED: missing
- CONFIG_RESOURCE_COUNTERS: enabled
- CONFIG_BLK_CGROUP: enabled
- CONFIG_IOSCHED_CFQ: enabled
- CONFIG_BLK_DEV_THROTTLING: missing
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: missing
- CONFIG_NET_CLS_CGROUP: enabled
- CONFIG_NETPRIO_CGROUP: missing
- CONFIG_CFS_BANDWIDTH: missing
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: missing
- CONFIG_EXT3_FS: enabled (as module)
- CONFIG_EXT3_FS_XATTR: enabled
- CONFIG_EXT3_FS_POSIX_ACL: enabled
- CONFIG_EXT3_FS_SECURITY: enabled
- CONFIG_EXT4_FS: enabled (as module)
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Storage Drivers:
  - "aufs":
    - CONFIG_AUFS_FS: enabled (as module)
  - "btrfs":
    - CONFIG_BTRFS_FS: enabled (as module)
  - "devicemapper":
    - CONFIG_BLK_DEV_DM: enabled (as module)
    - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
  - "overlay":
    - CONFIG_OVERLAY_FS: missing
  - "zfs":
    - /dev/zfs: missing
    - zfs command: missing
    - zpool command: missing

10
  • 1
    That's odd. Please post the docker run command that you're using to start this container and if you're using your own Dockerfile, post that too.
    – helmbert
    Jan 17, 2016 at 17:23
  • 1
    What kernel/system are you on? Sounds like your system may not have the minimum requirements to run docker. Docker requires kernel 3.10 as a bare minimum ( You can check if everything is in place using this script; raw.githubusercontent.com/docker/docker/master/contrib/…)
    – thaJeztah
    Jan 17, 2016 at 17:44
  • uname -a Linux ad-docker-qa-0002 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u6 x86_64 GNU/Linux -- there's your issue. This is probably Debian Wheezy, isn't it? Upgrade to Jessie or install a newer kernel from backports.
    – helmbert
    Jan 17, 2016 at 18:09
  • Yeah it is wheezy. Is docker not supported for wheezy version ?
    – vaibhav.g
    Jan 17, 2016 at 18:10
  • 1
    Since when is 2 greater than 10?
    – helmbert
    Jan 17, 2016 at 18:23

1 Answer 1

1

Based on the information provided, docker is installed on a kernel version that's too old to run docker and doesnt have all feature required to safely run docker.

Docker requires kernel 3.10 as a minimum (preferably newer), and always make sure your kernel is up-to-date to minimize security risks.

Although Debian wheezy is still supported, if possible, I'd recommend to upgrade to a newer release (Jessie).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.