小编Yoh*_*nna的帖子

如何使用 TypeScript 在接口中定义命名的对象数组?

如何restaurants在 TypeScript 的接口中定义属性?

let test = {
  user_id: 5,
  restaurants: [
    {
      restaurant_id: 5,
      restaurant_rank: 5
    },
    {
      restaurant_id: 6,
      restaurant_rank: 6
    }
  ],
  timestamp: 'test'
};
Run Code Online (Sandbox Code Playgroud)

笔记

我查看了以下问题,但没有一个解决了我的问题:

如何使用 Typescript 为对象数组定义接口?

如何在打字稿中定义对象数组?

arrays node.js typescript

8
推荐指数
1
解决办法
7684
查看次数

Docker 无法构建镜像,退出代码为 139

我正在尝试从 CentOS 6.9 构建图像。使用这个 Dockerfile:

FROM centos:6.9

RUN ls
Run Code Online (Sandbox Code Playgroud)

但它一直失败,退出代码为 139,输出如下:

$ docker build -t centos-6.9 .
[+] Building 1.1s (7/7) FINISHED
 => [internal] load build definition from Dockerfile                                                                                             0.0s 
 => => transferring dockerfile: 72B                                                                                                              0.0s 
 => [internal] load .dockerignore                                                                                                                0.0s 
 => => transferring context: 2B                                                                                                                  0.0s 
 => [internal] load metadata for docker.io/library/centos:6.9                                                                                    0.6s 
 => [internal] load build context                                                                                                                0.1s 
 => => transferring context: 72B                                                                                                                 0.0s 
 => CACHED [1/3] FROM docker.io/library/centos:6.9@sha256:6fff0a9edc920968351eb357c5b84016000fec6956e6d745f695e5a34f18ecd2                       0.0s 
 => [2/3] COPY . .                                                                                                                               0.0s 
 => ERROR …
Run Code Online (Sandbox Code Playgroud)

centos centos6 docker wsl-2

4
推荐指数
1
解决办法
5224
查看次数

标签 统计

arrays ×1

centos ×1

centos6 ×1

docker ×1

node.js ×1

typescript ×1

wsl-2 ×1