首页 \ 问答 \ Docker - apt-get安装失败(Docker - apt-get install fail)

Docker - apt-get安装失败(Docker - apt-get install fail)

我有一个非常容易的码头 - 撰写/码头同步脚本:

搬运工-撰写-dev.yml

# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  apache:
    volumes:
      - ./docker-config/vhost:/etc/apache2/sites-enabled/000-default.conf
      - jettsw53-sync:/var/www/html:nocopy # nocopy is important

# that the important thing
volumes:
  jettsw53-sync:
    external: true

泊坞窗,compose.yml

version: '2'
services:
  apache:
    build: .
    ports:
      - 80:80

  db:
    image: orchardup/mysql
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: jettsw53

Dockerfile

FROM bylexus/apache-php7

RUN apt-get update && \
    apt-get install -y \
      curl \
      vim

CMD ["/usr/local/bin/run"]

泊坞窗,sync.yml

version: "2"

options:
  verbose: true
syncs:
  jettsw53-sync: # tip: add -sync and you keep consistent names as a convention
    src: './src'
    sync_excludes: ['.git', 'var/cache/*']

当我启动这个设置时,运行apt-get install时出现这个错误:

Building apache
Step 1/3 : FROM bylexus/apache-php7
 ---> 97d3e723b95a
Step 2/3 : RUN apt-get update &&     apt-get install -y       curl       vim
 ---> Running in ae4aa07c3b4f
Ign:1 http://security.ubuntu.com/ubuntu yakkety-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu yakkety InRelease
Err:3 http://security.ubuntu.com/ubuntu yakkety-security Release
  404  Not Found [IP: 91.189.88.161 80]
Ign:4 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease
Ign:5 http://archive.ubuntu.com/ubuntu yakkety-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu yakkety Release
  404  Not Found [IP: 91.189.88.152 80]
Err:7 http://archive.ubuntu.com/ubuntu yakkety-updates Release
  404  Not Found [IP: 91.189.88.152 80]
Err:8 http://archive.ubuntu.com/ubuntu yakkety-backports Release
  404  Not Found [IP: 91.189.88.152 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu yakkety-security Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu yakkety Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-updates Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-backports Release' does no longer have a Release file.
Service 'apache' failed to build: The command '/bin/sh -c apt-get update &&     apt-get install -y       curl       vim' returned a non-zero code: 100
EXCEPTION: #<Docker::Compose::Error: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7>
MESSAGE: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7

有人知道这里发生了什么,我该如何解决?


I have a pretty easy docker-compose/docker-sync script:

docker-compose-dev.yml

# this is our development docker-compose building on top of the production docker-compose, just mounting
# the sync image - not redefining anything else

version: "2"
services:
  apache:
    volumes:
      - ./docker-config/vhost:/etc/apache2/sites-enabled/000-default.conf
      - jettsw53-sync:/var/www/html:nocopy # nocopy is important

# that the important thing
volumes:
  jettsw53-sync:
    external: true

docker-compose.yml

version: '2'
services:
  apache:
    build: .
    ports:
      - 80:80

  db:
    image: orchardup/mysql
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: jettsw53

Dockerfile

FROM bylexus/apache-php7

RUN apt-get update && \
    apt-get install -y \
      curl \
      vim

CMD ["/usr/local/bin/run"]

docker-sync.yml

version: "2"

options:
  verbose: true
syncs:
  jettsw53-sync: # tip: add -sync and you keep consistent names as a convention
    src: './src'
    sync_excludes: ['.git', 'var/cache/*']

When I start this setup, I get this error when running apt-get install:

Building apache
Step 1/3 : FROM bylexus/apache-php7
 ---> 97d3e723b95a
Step 2/3 : RUN apt-get update &&     apt-get install -y       curl       vim
 ---> Running in ae4aa07c3b4f
Ign:1 http://security.ubuntu.com/ubuntu yakkety-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu yakkety InRelease
Err:3 http://security.ubuntu.com/ubuntu yakkety-security Release
  404  Not Found [IP: 91.189.88.161 80]
Ign:4 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease
Ign:5 http://archive.ubuntu.com/ubuntu yakkety-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu yakkety Release
  404  Not Found [IP: 91.189.88.152 80]
Err:7 http://archive.ubuntu.com/ubuntu yakkety-updates Release
  404  Not Found [IP: 91.189.88.152 80]
Err:8 http://archive.ubuntu.com/ubuntu yakkety-backports Release
  404  Not Found [IP: 91.189.88.152 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu yakkety-security Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu yakkety Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-updates Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-backports Release' does no longer have a Release file.
Service 'apache' failed to build: The command '/bin/sh -c apt-get update &&     apt-get install -y       curl       vim' returned a non-zero code: 100
EXCEPTION: #<Docker::Compose::Error: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7>
MESSAGE: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7

Does anybody know what is happening here and how can I solve it?


原文:https://stackoverflow.com/questions/48734243
更新时间:2022-10-08 08:10

最满意答案

您可以在http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf (等式11)的第4页上下文中看到该公式。 在那篇论文中,他们使用F作为强度,我假设你有。因为你的强度是标量,你只想取其差异的平方。

您想要计算一个权重矩阵,用于计算A中任何条目与A中任何其他条目的亲和力。因为您的A有25个条目,所以您的权重矩阵将为25x25。

因为你只关心亮度这很容易:

len = length(A(:));
W = zeros(len);
for i = 1:len
    for j = 1:len
       W(i,j) = (A(i) - A(j))^2;
    end
end

现在,如果你想查看A(1,1)和A(1,2)之间的权重,你可以这样做:

i = sub2ind(size(A), 1, 1)
j = sub2ind(size(A), 1, 2)
W(i, j)

但是如果你设置r = 1(根据NCuts公式)那么你可能想要这样的东西:

sigma= 10;
r = 1;
A = magic(3);
siz = size(A);
len = length(A(:));
W = zeros(len);
for i = 1:len
    for j = 1:len
       [xi,yi] = ind2sub(siz,i);
       [xj,yj] = ind2sub(siz,j);
       if((xi-xj)^2 + (yi-yj)^2) > r^2
           W(i,j) = 0;
       else
           W(i,j) = exp(-(A(i) - A(j))^2 / sigma^2);
       end
    end
end

A11 = sub2ind(siz, 1, 1)
A12 = sub2ind(siz, 1, 2)
W(A11, A12)

You can see that formula in context on page 4 of http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf (equation 11). In that paper they use F for intensity where I assume you have I. Since your intensities are scalars, you just want to take the square of their differences.

You want to calculate a weight matrix that calculates the affinity of any entry in A to any other entry in A. Because your A has 25 entries, your weight matrix will be 25x25.

Since you are only worried about the brightness this is easy:

len = length(A(:));
W = zeros(len);
for i = 1:len
    for j = 1:len
       W(i,j) = (A(i) - A(j))^2;
    end
end

Now if you want to look up the weight between A(1,1) and A(1,2) you can do it like this:

i = sub2ind(size(A), 1, 1)
j = sub2ind(size(A), 1, 2)
W(i, j)

But if you set r=1 (according to the NCuts formula) then you might want something like this:

sigma= 10;
r = 1;
A = magic(3);
siz = size(A);
len = length(A(:));
W = zeros(len);
for i = 1:len
    for j = 1:len
       [xi,yi] = ind2sub(siz,i);
       [xj,yj] = ind2sub(siz,j);
       if((xi-xj)^2 + (yi-yj)^2) > r^2
           W(i,j) = 0;
       else
           W(i,j) = exp(-(A(i) - A(j))^2 / sigma^2);
       end
    end
end

A11 = sub2ind(siz, 1, 1)
A12 = sub2ind(siz, 1, 2)
W(A11, A12)

相关问答

更多

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)