conan-io / training

(Deprecated) Support code for conan 1.X trainings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble with "docker-compose up -d" command on Linux (OSD) platform

SujjithS opened this issue · comments

OSD details,
OSD Version - OSD 6
Kernel - 5.10.16.3-microsoft-standard-WSL2

Below are the steps I followed from specified steps in Docupedia, still I get the same error. Can someone assist here?

conan_practice$ sudo ifconfig lo:0 172.16.123.123 up

conan_practice$ mkdir -p /.px; echo -e '[proxy]\nendpoints = <>:8080\noptimize = False\nrenewtoken = True\n\n[server]\nbinds = 127.0.0.1:3128,172.16.123.123:3128\n\n[logger]\nlevel = 40\nlogtofile = False' >/.px/config.ini

conan_practice$ /opt/osd/proxy/osd-proxy-restart
-bash: /opt/osd/proxy/osd-proxy-restart: No such file or directory

conan_practice$ sudo cat /etc/apt/sources.list

conan_practice$ sudo apt-get update

Fetched 10.4 kB in 3s (4140 B/s)
Reading package lists... Done
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:19 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:19 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:19 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:19 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:19 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:19 and /etc/apt/sources.list.d/docker.list:1

conan_practice$ sed s/1.28.1/1.33.1/ training/docker_environment/conan-training/Dockerfile > training/docker_environment/conan-training/tmpfile ; mv training/docker_environment/conan-training/tmpfile training/docker_environment/conan-training/Dockerfile
conan_practice$ cd training/docker_environment
conan_practice/training/docker_environment$ docker-compose build --build-arg "http_proxy=" --build-arg "https_proxy=" conan-training
Building conan-training

Step 1/7 : ARG CONAN_VERSION
Step 2/7 : FROM conanio/gcc10:${CONAN_VERSION}
---> 919bc4dfb6b7
Step 3/7 : RUN sudo apt-get -qq update && sudo apt-get -qq install -y --no-install-recommends vim nano less g++-arm-linux-gnueabihf cmake
---> Running in e72ec44b78f6
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/focal/InRelease Could not resolve 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Unable to locate package vim
E: Unable to locate package nano
E: Package 'less' has no installation candidate
E: Unable to locate package g++-arm-linux-gnueabihf
E: Couldn't find any package by regex 'g++-arm-linux-gnueabihf'
E: Package 'cmake' has no installation candidate
ERROR: Service 'conan-training' failed to build: The command '/bin/sh -c sudo apt-get -qq update && sudo apt-get -qq install -y --no-install-recommends vim nano less g++-arm-linux-gnueabihf cmake' returned a non-zero code: 100
conan_practice/training/docker_environment$ docker-compose up -d
Building conan-training
Step 1/7 : ARG CONAN_VERSION
Step 2/7 : FROM conanio/gcc10:${CONAN_VERSION}
---> 919bc4dfb6b7
Step 3/7 : RUN sudo apt-get -qq update && sudo apt-get -qq install -y --no-install-recommends vim nano less g++-arm-linux-gnueabihf cmake
---> Running in 7a468b623bd1
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Could not resolve 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/focal/InRelease Could not resolve 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Unable to locate package vim
E: Unable to locate package nano
E: Package 'less' has no installation candidate
E: Unable to locate package g++-arm-linux-gnueabihf
E: Couldn't find any package by regex 'g++-arm-linux-gnueabihf'
E: Package 'cmake' has no installation candidate
ERROR: Service 'conan-training' failed to build: The command '/bin/sh -c sudo apt-get -qq update && sudo apt-get -qq install -y --no-install-recommends vim nano less g++-arm-linux-gnueabihf cmake' returned a non-zero code: 100

commented

Hi @SujjithS

Is it even possible to run docker inside wsl2 in Windows? Doesn't it seem a bit too nested infra? why not docker-desktop?
I don't have enough knowledge to triage what could be happening with that specific OSD Linux and docker, doesn't seem an issue from the Conan image, I'll ask @uilianries to check, but it is likely that this lies a bit outside of our expertise that we could help.

Hello @SujjithS I have to say your question is more about Docker feature than this tutorial. I don't have answer, but I strongly suggest you asking for help on https://forums.docker.com which has Docker experts there.

Anyway, you can run Docker on Windows Desktop directly and run Ubuntu images. I don't recommend you using WSL2 or any other extra layer which could complicate your environment even more.

I have Docker on Windows and it works fine when running Ubuntu images.

To check how to install Docker on Windows, please, follow: https://docs.docker.com/desktop/install/windows-install/

Actually, we are using Linux environment and do not have Windows. @uilianries

commented

But you reported:

Kernel - 5.10.16.3-microsoft-standard-WSL2

Isn't that Windows?