# Build Moby from GitHub sources

**URL:** <https://forums.mobyproject.org/t/build-moby-from-github-sources/144>\
**Category:** Support\
**Created:** [September 21, 2017, 9:56pm UTC](https://forums.mobyproject.org/t/build-moby-from-github-sources/144 "2017-09-21T21:56:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomanZavodskikh](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RomanZavodskikh](https://forums.mobyproject.org/u/RomanZavodskikh)\
**Post date:** [September 21, 2017, 9:56pm UTC](https://forums.mobyproject.org/t/build-moby-from-github-sources/144/1 "2017-09-21T21:56:13Z")

</div>

Hello!  
I just wanted to patch dockerd and to run it.  
So, I’ve cloned [https://github.com/moby/moby](https://github.com/moby/moby) and executed such kind of commands to build and run my patched dockerd.

```auto
# Building dockerd
root@ubuntu-xenial:~/moby# systemctl start docker
root@ubuntu-xenial:~/moby# make
...
root@ubuntu-xenial:~/moby# systemctl stop docker

# Running of builded dockerd
root@ubuntu-xenial:~/moby# cd bundles/
root@ubuntu-xenial:~/moby/bundles# ./binary-daemon/dockerd
INFO[2017-09-20T13:01:39.647651349Z] libcontainerd: new containerd process, pid: 6413 
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=1048576
INFO[2017-09-20T13:01:40.663880382Z] [graphdriver] using prior storage driver: aufs 
INFO[2017-09-20T13:01:40.690718484Z] Graph migration to content-addressability took 0.00 seconds 
WARN[2017-09-20T13:01:40.691160071Z] Your kernel does not support swap memory limit 
WARN[2017-09-20T13:01:40.691255948Z] Your kernel does not support cgroup rt period 
WARN[2017-09-20T13:01:40.691372765Z] Your kernel does not support cgroup rt runtime 
INFO[2017-09-20T13:01:40.691909525Z] Loading containers: start.                   
INFO[2017-09-20T13:01:40.809145234Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address 
INFO[2017-09-20T13:01:40.843636616Z] Loading containers: done.                    
INFO[2017-09-20T13:01:40.884713044Z] Docker daemon commit=149f3ac graphdriver(s)=aufs version=17.06.0-dev
INFO[2017-09-20T13:01:40.884814711Z] Daemon has completed initialization          
INFO[2017-09-20T13:01:40.903378545Z] API listen on /var/run/docker.sock

```

It compiled successfully, but I’m not able to run any container: I get error like this:

```auto
# Trying to run some container in other terminal
root@ubuntu-xenial:~/moby/bundles/binary-daemon# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
95309415213f ubuntu "bash" About an hour ago Created heuristic_kilby
0b3a519b622c nginx "nginx -g 'daemon ..." 17 hours ago Created 80/tcp peaceful_torvalds
root@ubuntu-xenial:~/moby/bundles/binary-daemon# docker start -i 95309415213f
Error response from daemon: oci runtime error: target os mismatch with current os linux
ERRO[0000] error waiting for container: context canceled

```

1. What is the right algorithm to build and run Docker containers using Moby?
2. How cat I resolve this kind of error?
3. Is it possible to do such kind of build&run on Windows 10/Windows Server 2016?

---

<div class="post-metadata">

**Author:** ![Achal1234](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@Achal1234](https://forums.mobyproject.org/u/Achal1234)\
**Post date:** [March 2, 2019, 9:38am UTC](https://forums.mobyproject.org/t/build-moby-from-github-sources/144/2 "2019-03-02T09:38:26Z")

</div>

Have you got the answer?

---

<div class="post-metadata">

**Author:** ![YZLRYO](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.mobyproject.org/yzlryo/32/269_2.png) [@YZLRYO](https://forums.mobyproject.org/u/YZLRYO)\
**Post date:** [December 27, 2021, 8:37am UTC](https://forums.mobyproject.org/t/build-moby-from-github-sources/144/3 "2021-12-27T08:37:53Z")

</div>

Got answers？ Running into similar situation
