te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>docker compose build fails but docker build works - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

docker compose build fails but docker build works - Stack Overflow

programmeradmin3浏览0评论

I cloned a project. The root of the project has a docker-compose.yaml file. The project recipe says to "docker compose build --no-cache"

My understanding of docker is that this command searches the docker-compose.yaml for the build keyword. When a service with build keyword is found it builds an image based on an associated Dockerfile.

As the various builds are tried they get cancelled. There is no reason given but the failing command line is shown. The builds are being cancelled whenever spt-get is called.

Hoping to get more information I cd to one of the directories with the Dockerfile. I try "docker build ." and the image is created successfuly. Now I suspect the docker compose plugin. Reinstalling the plugin didn't help.

I looked for help on docker compose and found there is a run command that executes a RUN in the Dockerfile. I try the followin from one of the Dockerfiles --

sudo docker compose run dns "apt-get update && \
        apt-get -y install tcpdump screen tmux ntp ntpdate iproute2 net-tools \
                                        iputils-ping bind9

This results in

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "apt-get update &&         apt-get -y install tcpdump screen tmux ntp ntpdate iproute2 net-tools                                         iputils-ping bind9\n": executable file not found in $PATH: unknown

Now I am stuck.

I verified the Dockerfile using "docker build" I suspected the docker compose plugin which I reinstalled.It didn't help.

发布评论

评论列表(0)

  1. 暂无评论