How can I install Docker in a Debian Chroot?












1















I have a Raspberry Pi 2 running Raspian (Debian 9 Stretch Arm). I want to create a Chroot environment of pure Debian Stretch, and install Docker there. I follow all the proper instructions from here: https://docs.docker.com/install/linux/docker-ce/debian



When it comes time to install docker-ce, Aptitude says I'm missing some libraries (like libc6), but I believe the libraries are there and not being recognized. This would seem a to be very simple process, but I'm hitting a giant barrier.



I recorded a video of the install
https://youtu.be/wMmZGxZOBbs



Here are the commands I executed (all ran as root):



mkdir d
debootstrap stretch d
mount -B /dev d/dev
mount -B /dev/pts d/dev/pts
mount -B /proc d/proc
mount -B /sys d/sys
chroot d /bin/bash


chroot'd



nano /etc/apt/sources.list # add contrib and non-free
apt-get update
apt-get install aptitude
apt-get install bash-completion
apt-get install
apt-transport-https
ca-certificates
curl
gnupg2
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository
"deb [arch=armhf] https://download.docker.com/linux/debian
$(lsb_release -cs)
stable"
apt-get update
apt-get install docker-ce # Fails, says package unavailable
aptitude # Try to install docker in aptitude shows missings libraries


Aptitude Error Screen



UPDATE:



When running the convenience script, I receive this output:



root@pi2:/# curl -fsSL https://get.docker.com -o get-docker.sh
root@pi2:/# sh get-docker.sh
# Executing docker install script, commit: 4957679
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armel] https://download.docker.com/linux/debian stretch edge" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Unable to locate package docker-ce


Running apt-get update shows that the repository "doesn't support architecture 'armel'".



UPDATE2



Thanks to the answer from AB, it may not entirely solve the problem, but I'm definitely making great progress.



# ### Architecture Output from Debian Chroot
# dpkg --print-architecture
armel


and



# ### Architecture Output from Raspian
# dpkg --print-architecture
armhf
# lsb_release -cs # My system is up to date
stretch
# debootstrap --arch=armhf stetch d
E: No such script: /usr/share/debootstrap/scripts/stetch


UPDATE3



I found that it's possible to install Debian architechture Armhf by using the following command.



# debootstrap --foreign --arch=armhf stretch dir


UPDATE4 SOLUTION



I successfully installed docker by forcing Debian to install as architecture armhf. Here are the steps I used to install Debian as architecture armhf.



mkdir d
debootstrap --foreign --arch=armhf stretch d
cat /etc/resolv.conf > d/etc/resolv.conf
chroot d /bin/bash
./debootstrap/debootstrap --second-stage
apt-get clean


After that, I follow the process of installing docker on Debian as normal.










share|improve this question

























  • Thanks for the suggestion! I added all the commands I used in the video.

    – Sepero
    Jan 26 at 12:01






  • 1





    Your video is showing armel architecture while Docker is available for armhf architecture.

    – A.B
    Jan 26 at 12:32











  • That's a good point to consider. I know that the Pi2 isn't 64bit, so I assumed that the builds for armhf just meant some generic 32bit arm build? I may have to investigate into this more. Thank you!

    – Sepero
    Jan 26 at 12:38











  • Well thinking a bit more, I wonder why there's armel around here. It shouldn't even be there at all

    – A.B
    Jan 26 at 22:16
















1















I have a Raspberry Pi 2 running Raspian (Debian 9 Stretch Arm). I want to create a Chroot environment of pure Debian Stretch, and install Docker there. I follow all the proper instructions from here: https://docs.docker.com/install/linux/docker-ce/debian



When it comes time to install docker-ce, Aptitude says I'm missing some libraries (like libc6), but I believe the libraries are there and not being recognized. This would seem a to be very simple process, but I'm hitting a giant barrier.



I recorded a video of the install
https://youtu.be/wMmZGxZOBbs



Here are the commands I executed (all ran as root):



mkdir d
debootstrap stretch d
mount -B /dev d/dev
mount -B /dev/pts d/dev/pts
mount -B /proc d/proc
mount -B /sys d/sys
chroot d /bin/bash


chroot'd



nano /etc/apt/sources.list # add contrib and non-free
apt-get update
apt-get install aptitude
apt-get install bash-completion
apt-get install
apt-transport-https
ca-certificates
curl
gnupg2
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository
"deb [arch=armhf] https://download.docker.com/linux/debian
$(lsb_release -cs)
stable"
apt-get update
apt-get install docker-ce # Fails, says package unavailable
aptitude # Try to install docker in aptitude shows missings libraries


Aptitude Error Screen



UPDATE:



When running the convenience script, I receive this output:



root@pi2:/# curl -fsSL https://get.docker.com -o get-docker.sh
root@pi2:/# sh get-docker.sh
# Executing docker install script, commit: 4957679
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armel] https://download.docker.com/linux/debian stretch edge" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Unable to locate package docker-ce


Running apt-get update shows that the repository "doesn't support architecture 'armel'".



UPDATE2



Thanks to the answer from AB, it may not entirely solve the problem, but I'm definitely making great progress.



# ### Architecture Output from Debian Chroot
# dpkg --print-architecture
armel


and



# ### Architecture Output from Raspian
# dpkg --print-architecture
armhf
# lsb_release -cs # My system is up to date
stretch
# debootstrap --arch=armhf stetch d
E: No such script: /usr/share/debootstrap/scripts/stetch


UPDATE3



I found that it's possible to install Debian architechture Armhf by using the following command.



# debootstrap --foreign --arch=armhf stretch dir


UPDATE4 SOLUTION



I successfully installed docker by forcing Debian to install as architecture armhf. Here are the steps I used to install Debian as architecture armhf.



mkdir d
debootstrap --foreign --arch=armhf stretch d
cat /etc/resolv.conf > d/etc/resolv.conf
chroot d /bin/bash
./debootstrap/debootstrap --second-stage
apt-get clean


After that, I follow the process of installing docker on Debian as normal.










share|improve this question

























  • Thanks for the suggestion! I added all the commands I used in the video.

    – Sepero
    Jan 26 at 12:01






  • 1





    Your video is showing armel architecture while Docker is available for armhf architecture.

    – A.B
    Jan 26 at 12:32











  • That's a good point to consider. I know that the Pi2 isn't 64bit, so I assumed that the builds for armhf just meant some generic 32bit arm build? I may have to investigate into this more. Thank you!

    – Sepero
    Jan 26 at 12:38











  • Well thinking a bit more, I wonder why there's armel around here. It shouldn't even be there at all

    – A.B
    Jan 26 at 22:16














1












1








1








I have a Raspberry Pi 2 running Raspian (Debian 9 Stretch Arm). I want to create a Chroot environment of pure Debian Stretch, and install Docker there. I follow all the proper instructions from here: https://docs.docker.com/install/linux/docker-ce/debian



When it comes time to install docker-ce, Aptitude says I'm missing some libraries (like libc6), but I believe the libraries are there and not being recognized. This would seem a to be very simple process, but I'm hitting a giant barrier.



I recorded a video of the install
https://youtu.be/wMmZGxZOBbs



Here are the commands I executed (all ran as root):



mkdir d
debootstrap stretch d
mount -B /dev d/dev
mount -B /dev/pts d/dev/pts
mount -B /proc d/proc
mount -B /sys d/sys
chroot d /bin/bash


chroot'd



nano /etc/apt/sources.list # add contrib and non-free
apt-get update
apt-get install aptitude
apt-get install bash-completion
apt-get install
apt-transport-https
ca-certificates
curl
gnupg2
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository
"deb [arch=armhf] https://download.docker.com/linux/debian
$(lsb_release -cs)
stable"
apt-get update
apt-get install docker-ce # Fails, says package unavailable
aptitude # Try to install docker in aptitude shows missings libraries


Aptitude Error Screen



UPDATE:



When running the convenience script, I receive this output:



root@pi2:/# curl -fsSL https://get.docker.com -o get-docker.sh
root@pi2:/# sh get-docker.sh
# Executing docker install script, commit: 4957679
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armel] https://download.docker.com/linux/debian stretch edge" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Unable to locate package docker-ce


Running apt-get update shows that the repository "doesn't support architecture 'armel'".



UPDATE2



Thanks to the answer from AB, it may not entirely solve the problem, but I'm definitely making great progress.



# ### Architecture Output from Debian Chroot
# dpkg --print-architecture
armel


and



# ### Architecture Output from Raspian
# dpkg --print-architecture
armhf
# lsb_release -cs # My system is up to date
stretch
# debootstrap --arch=armhf stetch d
E: No such script: /usr/share/debootstrap/scripts/stetch


UPDATE3



I found that it's possible to install Debian architechture Armhf by using the following command.



# debootstrap --foreign --arch=armhf stretch dir


UPDATE4 SOLUTION



I successfully installed docker by forcing Debian to install as architecture armhf. Here are the steps I used to install Debian as architecture armhf.



mkdir d
debootstrap --foreign --arch=armhf stretch d
cat /etc/resolv.conf > d/etc/resolv.conf
chroot d /bin/bash
./debootstrap/debootstrap --second-stage
apt-get clean


After that, I follow the process of installing docker on Debian as normal.










share|improve this question
















I have a Raspberry Pi 2 running Raspian (Debian 9 Stretch Arm). I want to create a Chroot environment of pure Debian Stretch, and install Docker there. I follow all the proper instructions from here: https://docs.docker.com/install/linux/docker-ce/debian



When it comes time to install docker-ce, Aptitude says I'm missing some libraries (like libc6), but I believe the libraries are there and not being recognized. This would seem a to be very simple process, but I'm hitting a giant barrier.



I recorded a video of the install
https://youtu.be/wMmZGxZOBbs



Here are the commands I executed (all ran as root):



mkdir d
debootstrap stretch d
mount -B /dev d/dev
mount -B /dev/pts d/dev/pts
mount -B /proc d/proc
mount -B /sys d/sys
chroot d /bin/bash


chroot'd



nano /etc/apt/sources.list # add contrib and non-free
apt-get update
apt-get install aptitude
apt-get install bash-completion
apt-get install
apt-transport-https
ca-certificates
curl
gnupg2
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository
"deb [arch=armhf] https://download.docker.com/linux/debian
$(lsb_release -cs)
stable"
apt-get update
apt-get install docker-ce # Fails, says package unavailable
aptitude # Try to install docker in aptitude shows missings libraries


Aptitude Error Screen



UPDATE:



When running the convenience script, I receive this output:



root@pi2:/# curl -fsSL https://get.docker.com -o get-docker.sh
root@pi2:/# sh get-docker.sh
# Executing docker install script, commit: 4957679
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armel] https://download.docker.com/linux/debian stretch edge" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Unable to locate package docker-ce


Running apt-get update shows that the repository "doesn't support architecture 'armel'".



UPDATE2



Thanks to the answer from AB, it may not entirely solve the problem, but I'm definitely making great progress.



# ### Architecture Output from Debian Chroot
# dpkg --print-architecture
armel


and



# ### Architecture Output from Raspian
# dpkg --print-architecture
armhf
# lsb_release -cs # My system is up to date
stretch
# debootstrap --arch=armhf stetch d
E: No such script: /usr/share/debootstrap/scripts/stetch


UPDATE3



I found that it's possible to install Debian architechture Armhf by using the following command.



# debootstrap --foreign --arch=armhf stretch dir


UPDATE4 SOLUTION



I successfully installed docker by forcing Debian to install as architecture armhf. Here are the steps I used to install Debian as architecture armhf.



mkdir d
debootstrap --foreign --arch=armhf stretch d
cat /etc/resolv.conf > d/etc/resolv.conf
chroot d /bin/bash
./debootstrap/debootstrap --second-stage
apt-get clean


After that, I follow the process of installing docker on Debian as normal.







debian docker dependencies






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 27 at 6:49







Sepero

















asked Jan 26 at 11:35









SeperoSepero

58231226




58231226













  • Thanks for the suggestion! I added all the commands I used in the video.

    – Sepero
    Jan 26 at 12:01






  • 1





    Your video is showing armel architecture while Docker is available for armhf architecture.

    – A.B
    Jan 26 at 12:32











  • That's a good point to consider. I know that the Pi2 isn't 64bit, so I assumed that the builds for armhf just meant some generic 32bit arm build? I may have to investigate into this more. Thank you!

    – Sepero
    Jan 26 at 12:38











  • Well thinking a bit more, I wonder why there's armel around here. It shouldn't even be there at all

    – A.B
    Jan 26 at 22:16



















  • Thanks for the suggestion! I added all the commands I used in the video.

    – Sepero
    Jan 26 at 12:01






  • 1





    Your video is showing armel architecture while Docker is available for armhf architecture.

    – A.B
    Jan 26 at 12:32











  • That's a good point to consider. I know that the Pi2 isn't 64bit, so I assumed that the builds for armhf just meant some generic 32bit arm build? I may have to investigate into this more. Thank you!

    – Sepero
    Jan 26 at 12:38











  • Well thinking a bit more, I wonder why there's armel around here. It shouldn't even be there at all

    – A.B
    Jan 26 at 22:16

















Thanks for the suggestion! I added all the commands I used in the video.

– Sepero
Jan 26 at 12:01





Thanks for the suggestion! I added all the commands I used in the video.

– Sepero
Jan 26 at 12:01




1




1





Your video is showing armel architecture while Docker is available for armhf architecture.

– A.B
Jan 26 at 12:32





Your video is showing armel architecture while Docker is available for armhf architecture.

– A.B
Jan 26 at 12:32













That's a good point to consider. I know that the Pi2 isn't 64bit, so I assumed that the builds for armhf just meant some generic 32bit arm build? I may have to investigate into this more. Thank you!

– Sepero
Jan 26 at 12:38





That's a good point to consider. I know that the Pi2 isn't 64bit, so I assumed that the builds for armhf just meant some generic 32bit arm build? I may have to investigate into this more. Thank you!

– Sepero
Jan 26 at 12:38













Well thinking a bit more, I wonder why there's armel around here. It shouldn't even be there at all

– A.B
Jan 26 at 22:16





Well thinking a bit more, I wonder why there's armel around here. It shouldn't even be there at all

– A.B
Jan 26 at 22:16










1 Answer
1






active

oldest

votes


















2














TL;DR: you cannot install Docker's docker-ce package on armel architecture, but your system, being a Rasberry Pi 2, should be running armhf anyway, so there's something wrong in your setup.



Docker's requirements for Debian:




OS requirements



To install Docker CE, you need the 64-bit version of one of these
Debian or Raspbian versions:




  • Buster 10

  • Stretch 9 (stable) / Raspbian Stretch


Docker CE is supported on x86_64 (or amd64), armhf, and arm64
architectures.
on your system
The text is a bit misleading, since armhf is supported and 32 bits. Anyway, as your system is using the armel architecture and not the armhf, there is no package available from docker.com. That is why whatever you try, you won't be able to follow their guide and install Docker.




What you can check first:





  • Verify if your system (outside of chroot) is using armel or armhf with dpkg --print-architecture. If the answer is armhf then your debootstrap command went wrong and you should try again with the --arch=armhf option. UPDATE: that was it for OP, but it appears --foreign was also needed along, so this command made it:



    debootstrap --foreign --arch=armhf stretch d


  • UPDATE: verify that the kernel is also an armhf kernel. Does it say armv7-something (probably armv7l) somewhere? or only arm or armv6-something ? It's possible that only the kernel isn't the correct one. If that's not an armv7 one you should consider changing it. Else this is an unexplainable bug with debootstrap, since I couldn't reproduce it on an other armhf platform.





Historical ideas to work around this issue below:




  • Check if your hardware supports armhf, and reinstall it using armhf instead of armel. Wikipedia tells the CPU for a Raspberry Pi 2 is at least an ARM Cortex-A7 so suitable for armhf as this (outdated) Debian page and its link to a Debian developper's blog confirm. The raspbian repository provides only armhf not armel. So there's no reason armel should be seen at all and it's quite puzzling.


What else can perhaps, but not easily anyway, be done else:




  • an other solution, out of scope for its difficulty here, if it does support armhf, would be to complete the missing multi-arch libraries required to install Docker.

  • Debian does ship for the as-of-now-unreleased future Debian 10 the equivalent docker.io package, available for armel (but it tells: "Using docker.io on non-amd64 hosts is not supported at this time"). So one can imagine that when Raspbian follows, this package can become available. Don't expect bleeding edge versions anyway.

  • It's probably possible to rebuild from sources those Docker packages for the armel architecture. This requires anyway knowledge you probably don't have yet.


Even if you get it installed on armel please consider that anything you'll try to pull from Docker Hub will be incompatible: if Docker doesn't provide armel chances are there will be no armel ecosystem at all.






share|improve this answer


























  • noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

    – A.B
    Jan 26 at 22:14











  • Thanks a lot AB. I have updated my post to reflect your answer.

    – Sepero
    Jan 27 at 2:20






  • 1





    Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

    – A.B
    Jan 27 at 9:19











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f496860%2fhow-can-i-install-docker-in-a-debian-chroot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














TL;DR: you cannot install Docker's docker-ce package on armel architecture, but your system, being a Rasberry Pi 2, should be running armhf anyway, so there's something wrong in your setup.



Docker's requirements for Debian:




OS requirements



To install Docker CE, you need the 64-bit version of one of these
Debian or Raspbian versions:




  • Buster 10

  • Stretch 9 (stable) / Raspbian Stretch


Docker CE is supported on x86_64 (or amd64), armhf, and arm64
architectures.
on your system
The text is a bit misleading, since armhf is supported and 32 bits. Anyway, as your system is using the armel architecture and not the armhf, there is no package available from docker.com. That is why whatever you try, you won't be able to follow their guide and install Docker.




What you can check first:





  • Verify if your system (outside of chroot) is using armel or armhf with dpkg --print-architecture. If the answer is armhf then your debootstrap command went wrong and you should try again with the --arch=armhf option. UPDATE: that was it for OP, but it appears --foreign was also needed along, so this command made it:



    debootstrap --foreign --arch=armhf stretch d


  • UPDATE: verify that the kernel is also an armhf kernel. Does it say armv7-something (probably armv7l) somewhere? or only arm or armv6-something ? It's possible that only the kernel isn't the correct one. If that's not an armv7 one you should consider changing it. Else this is an unexplainable bug with debootstrap, since I couldn't reproduce it on an other armhf platform.





Historical ideas to work around this issue below:




  • Check if your hardware supports armhf, and reinstall it using armhf instead of armel. Wikipedia tells the CPU for a Raspberry Pi 2 is at least an ARM Cortex-A7 so suitable for armhf as this (outdated) Debian page and its link to a Debian developper's blog confirm. The raspbian repository provides only armhf not armel. So there's no reason armel should be seen at all and it's quite puzzling.


What else can perhaps, but not easily anyway, be done else:




  • an other solution, out of scope for its difficulty here, if it does support armhf, would be to complete the missing multi-arch libraries required to install Docker.

  • Debian does ship for the as-of-now-unreleased future Debian 10 the equivalent docker.io package, available for armel (but it tells: "Using docker.io on non-amd64 hosts is not supported at this time"). So one can imagine that when Raspbian follows, this package can become available. Don't expect bleeding edge versions anyway.

  • It's probably possible to rebuild from sources those Docker packages for the armel architecture. This requires anyway knowledge you probably don't have yet.


Even if you get it installed on armel please consider that anything you'll try to pull from Docker Hub will be incompatible: if Docker doesn't provide armel chances are there will be no armel ecosystem at all.






share|improve this answer


























  • noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

    – A.B
    Jan 26 at 22:14











  • Thanks a lot AB. I have updated my post to reflect your answer.

    – Sepero
    Jan 27 at 2:20






  • 1





    Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

    – A.B
    Jan 27 at 9:19
















2














TL;DR: you cannot install Docker's docker-ce package on armel architecture, but your system, being a Rasberry Pi 2, should be running armhf anyway, so there's something wrong in your setup.



Docker's requirements for Debian:




OS requirements



To install Docker CE, you need the 64-bit version of one of these
Debian or Raspbian versions:




  • Buster 10

  • Stretch 9 (stable) / Raspbian Stretch


Docker CE is supported on x86_64 (or amd64), armhf, and arm64
architectures.
on your system
The text is a bit misleading, since armhf is supported and 32 bits. Anyway, as your system is using the armel architecture and not the armhf, there is no package available from docker.com. That is why whatever you try, you won't be able to follow their guide and install Docker.




What you can check first:





  • Verify if your system (outside of chroot) is using armel or armhf with dpkg --print-architecture. If the answer is armhf then your debootstrap command went wrong and you should try again with the --arch=armhf option. UPDATE: that was it for OP, but it appears --foreign was also needed along, so this command made it:



    debootstrap --foreign --arch=armhf stretch d


  • UPDATE: verify that the kernel is also an armhf kernel. Does it say armv7-something (probably armv7l) somewhere? or only arm or armv6-something ? It's possible that only the kernel isn't the correct one. If that's not an armv7 one you should consider changing it. Else this is an unexplainable bug with debootstrap, since I couldn't reproduce it on an other armhf platform.





Historical ideas to work around this issue below:




  • Check if your hardware supports armhf, and reinstall it using armhf instead of armel. Wikipedia tells the CPU for a Raspberry Pi 2 is at least an ARM Cortex-A7 so suitable for armhf as this (outdated) Debian page and its link to a Debian developper's blog confirm. The raspbian repository provides only armhf not armel. So there's no reason armel should be seen at all and it's quite puzzling.


What else can perhaps, but not easily anyway, be done else:




  • an other solution, out of scope for its difficulty here, if it does support armhf, would be to complete the missing multi-arch libraries required to install Docker.

  • Debian does ship for the as-of-now-unreleased future Debian 10 the equivalent docker.io package, available for armel (but it tells: "Using docker.io on non-amd64 hosts is not supported at this time"). So one can imagine that when Raspbian follows, this package can become available. Don't expect bleeding edge versions anyway.

  • It's probably possible to rebuild from sources those Docker packages for the armel architecture. This requires anyway knowledge you probably don't have yet.


Even if you get it installed on armel please consider that anything you'll try to pull from Docker Hub will be incompatible: if Docker doesn't provide armel chances are there will be no armel ecosystem at all.






share|improve this answer


























  • noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

    – A.B
    Jan 26 at 22:14











  • Thanks a lot AB. I have updated my post to reflect your answer.

    – Sepero
    Jan 27 at 2:20






  • 1





    Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

    – A.B
    Jan 27 at 9:19














2












2








2







TL;DR: you cannot install Docker's docker-ce package on armel architecture, but your system, being a Rasberry Pi 2, should be running armhf anyway, so there's something wrong in your setup.



Docker's requirements for Debian:




OS requirements



To install Docker CE, you need the 64-bit version of one of these
Debian or Raspbian versions:




  • Buster 10

  • Stretch 9 (stable) / Raspbian Stretch


Docker CE is supported on x86_64 (or amd64), armhf, and arm64
architectures.
on your system
The text is a bit misleading, since armhf is supported and 32 bits. Anyway, as your system is using the armel architecture and not the armhf, there is no package available from docker.com. That is why whatever you try, you won't be able to follow their guide and install Docker.




What you can check first:





  • Verify if your system (outside of chroot) is using armel or armhf with dpkg --print-architecture. If the answer is armhf then your debootstrap command went wrong and you should try again with the --arch=armhf option. UPDATE: that was it for OP, but it appears --foreign was also needed along, so this command made it:



    debootstrap --foreign --arch=armhf stretch d


  • UPDATE: verify that the kernel is also an armhf kernel. Does it say armv7-something (probably armv7l) somewhere? or only arm or armv6-something ? It's possible that only the kernel isn't the correct one. If that's not an armv7 one you should consider changing it. Else this is an unexplainable bug with debootstrap, since I couldn't reproduce it on an other armhf platform.





Historical ideas to work around this issue below:




  • Check if your hardware supports armhf, and reinstall it using armhf instead of armel. Wikipedia tells the CPU for a Raspberry Pi 2 is at least an ARM Cortex-A7 so suitable for armhf as this (outdated) Debian page and its link to a Debian developper's blog confirm. The raspbian repository provides only armhf not armel. So there's no reason armel should be seen at all and it's quite puzzling.


What else can perhaps, but not easily anyway, be done else:




  • an other solution, out of scope for its difficulty here, if it does support armhf, would be to complete the missing multi-arch libraries required to install Docker.

  • Debian does ship for the as-of-now-unreleased future Debian 10 the equivalent docker.io package, available for armel (but it tells: "Using docker.io on non-amd64 hosts is not supported at this time"). So one can imagine that when Raspbian follows, this package can become available. Don't expect bleeding edge versions anyway.

  • It's probably possible to rebuild from sources those Docker packages for the armel architecture. This requires anyway knowledge you probably don't have yet.


Even if you get it installed on armel please consider that anything you'll try to pull from Docker Hub will be incompatible: if Docker doesn't provide armel chances are there will be no armel ecosystem at all.






share|improve this answer















TL;DR: you cannot install Docker's docker-ce package on armel architecture, but your system, being a Rasberry Pi 2, should be running armhf anyway, so there's something wrong in your setup.



Docker's requirements for Debian:




OS requirements



To install Docker CE, you need the 64-bit version of one of these
Debian or Raspbian versions:




  • Buster 10

  • Stretch 9 (stable) / Raspbian Stretch


Docker CE is supported on x86_64 (or amd64), armhf, and arm64
architectures.
on your system
The text is a bit misleading, since armhf is supported and 32 bits. Anyway, as your system is using the armel architecture and not the armhf, there is no package available from docker.com. That is why whatever you try, you won't be able to follow their guide and install Docker.




What you can check first:





  • Verify if your system (outside of chroot) is using armel or armhf with dpkg --print-architecture. If the answer is armhf then your debootstrap command went wrong and you should try again with the --arch=armhf option. UPDATE: that was it for OP, but it appears --foreign was also needed along, so this command made it:



    debootstrap --foreign --arch=armhf stretch d


  • UPDATE: verify that the kernel is also an armhf kernel. Does it say armv7-something (probably armv7l) somewhere? or only arm or armv6-something ? It's possible that only the kernel isn't the correct one. If that's not an armv7 one you should consider changing it. Else this is an unexplainable bug with debootstrap, since I couldn't reproduce it on an other armhf platform.





Historical ideas to work around this issue below:




  • Check if your hardware supports armhf, and reinstall it using armhf instead of armel. Wikipedia tells the CPU for a Raspberry Pi 2 is at least an ARM Cortex-A7 so suitable for armhf as this (outdated) Debian page and its link to a Debian developper's blog confirm. The raspbian repository provides only armhf not armel. So there's no reason armel should be seen at all and it's quite puzzling.


What else can perhaps, but not easily anyway, be done else:




  • an other solution, out of scope for its difficulty here, if it does support armhf, would be to complete the missing multi-arch libraries required to install Docker.

  • Debian does ship for the as-of-now-unreleased future Debian 10 the equivalent docker.io package, available for armel (but it tells: "Using docker.io on non-amd64 hosts is not supported at this time"). So one can imagine that when Raspbian follows, this package can become available. Don't expect bleeding edge versions anyway.

  • It's probably possible to rebuild from sources those Docker packages for the armel architecture. This requires anyway knowledge you probably don't have yet.


Even if you get it installed on armel please consider that anything you'll try to pull from Docker Hub will be incompatible: if Docker doesn't provide armel chances are there will be no armel ecosystem at all.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 27 at 9:33

























answered Jan 26 at 20:19









A.BA.B

4,5921725




4,5921725













  • noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

    – A.B
    Jan 26 at 22:14











  • Thanks a lot AB. I have updated my post to reflect your answer.

    – Sepero
    Jan 27 at 2:20






  • 1





    Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

    – A.B
    Jan 27 at 9:19



















  • noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

    – A.B
    Jan 26 at 22:14











  • Thanks a lot AB. I have updated my post to reflect your answer.

    – Sepero
    Jan 27 at 2:20






  • 1





    Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

    – A.B
    Jan 27 at 9:19

















noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

– A.B
Jan 26 at 22:14





noticed that there's no reason armel should be running anywhere in the first place on a Raspberry Pi 2, so adjusted my answer

– A.B
Jan 26 at 22:14













Thanks a lot AB. I have updated my post to reflect your answer.

– Sepero
Jan 27 at 2:20





Thanks a lot AB. I have updated my post to reflect your answer.

– Sepero
Jan 27 at 2:20




1




1





Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

– A.B
Jan 27 at 9:19





Heh, so if my answer was the solution, you should mark it as accepted. Now the behaviour of debootstrap is strange. I tested the same on an Debian stretch (pure Debian, not Raspbian) armhf Odroid device, and debootstrap chose armhf. Anyway, I'll update my answer to add --foreign if that's also needed. last question what is giving uname -a ? Maybe your whole system is installed with armhf except the kernel?

– A.B
Jan 27 at 9:19


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f496860%2fhow-can-i-install-docker-in-a-debian-chroot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?