Tag: github

在dockerfile构build上主机密钥validation失败

我使用ssh-keygen创build了一个ssh密钥,并将id-rsa.pub内容添加到了我的github>settings>SSH & GPG keys 。 我能够克隆从我的terminal与git克隆git @ github的回购:myname / myrepo.git 但是同样的是在构builddocker文件的时候出现以下错误。 Cloning into 'Project-Jenkins'… Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 这是我如何在dockerfile中添加命令 RUN git clone git@github.com:myname/myrepo.git 这里出了什么问题? 这是我的dockerfile FROM ubuntu COPY script.sh /script.sh CMD ["/script.sh"] FROM python:2.7 RUN […]

Docker更改.gitconfig与令牌私人回购访问

我一直在挖掘,以解决在docker构build阶段访问私有回购的问题。 似乎使用“令牌”是实现这一点最简单和合理的安全方式。 我遇到了一篇文章 ,解释这一点。 在评论中,有人build议改进以添加github令牌。 我不能在docker里面工作。 我如何更改.gitconfig并让git始终使用令牌? 该命令需要更改为使用令牌: RUN echo "[url \"git@github.com:\"]\n\tinsteadOf = https://github.com/" >> /root/.gitconfig 评论: 一个更好的方法是生成一个只读访问该回购协议,并使用类似git config –global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/"的api标记git config –global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/" 。 这样你不需要包装脚本或SSH主机密钥检查,也不需要烘烤你的所有访问 如果有人能帮我过桥,那将是非常棒的。 谢谢

如何实现Multi-Arch-Docker Image构build的自动化

我已经在github上docker化了一个nodejs应用程序。 我的Dockerfile基于正式的nodejs图像。 官方的node-repo支持多种体系结构(x86,amd64,arm)。 这意味着我可以在不同的机器上构build完全相同的Dockerfile,从而为相应的体系结构创build不同的映像。 所以我正试图为我的应用程序无缝地提供相同的体系结构。 但是,如何? 我的目标是尽可能自动化。 我知道我理论上需要创build一个docker-manifest,它充当docker-repo并将最终用户docker-clientredirect到合适的映像。 Docker-Hub本身可以监视一个github仓库,并启动一个自动构build。 这将照顾amd64图像。 但是剩下的架构呢? 还有一种叫做“TravisCI”的服务,我想可以在qemu的帮助下照顾arm的搭build。 那么我认为这两个回购可以通过清单回购静态引用。 但是这仍然留下了一些未完成的架构。 但是使用多种服务/构build相同的应用程序的方式感觉不对。 有没有人知道一个更好,更完整的解决这个问题? 它基本上是通过几台机器运行相同的dockerfile并将其logging在清单中。

创build一个自动将文件暴露给主机操作系统的引导程序Dockerfile

我正在尝试为web开发创build一个引导程序Dockerfile。 我希望任何容器都可以从主机操作系统(Mac OS X)中访问我的代码。 我无法从Docker参考中知道什么是自动执行此过程的最佳方法。

在Docker容器中通过git + https // x-oauth-basic安装NPM失败

我有一个节点项目,我站在我的主机服务器(Ubuntu 14.04),我可以拉我的回购和执行NPM安装没有问题在主机上。 我的package.json包含一些私有的回收站,我们使用https来在我们的私有依赖项中引入npm。 像我们的package.json中的“依赖”一样: "local_utils": "git+http://12345:x-oauth-basic@github.com/ourprivateteam/local_utils.git", 我试图从一个docker集装箱内运行这个相同的应用程序,但在我们的docker图像的生成npm安装失败,我们的私人回购呼叫。 它会抛出一个错误: Failed to connect to github.com port 443: Connection timed out NPM中的正常依赖关系在容器内都能正常工作。 什么导致我们的私人回购错误?

Docker和Github集成 – Github文件在哪里?

我正在尝试docker和github集成。 我目前所做的是我在我的存储库中放置了一个Dockerfile: https : //github.com/mxlei01/YouTube-Channel-Search 。 现在忽略git clone命令,我试过了: docker pull mxlei01/youtube-channel-search docker images (to find all the images) docker run mxlei01/youtube-channel-search 但是,当我试图通过使用导出来提取文件: docker ps -a docker export <container ID> > file.tar tar -xvf file.tar 我无法使用以下命令在git仓库中find任何文件: find . -name "mongo.py" 所以我已经添加了一个命令手动获取项目,但是,我不认为这是正确的方式,但是,它可能是可行的。 任何人都可以指出我正确的方向? 谢谢 – – – – -编辑 – – – – – 原来你可以像这样做一个副本: RUN mkdir […]

安装github托pipe与Docker的npm依赖关系

我试图dockerize一个项目,但我在npm install过程中与我的Gulp 4依赖项的问题。 我正在使用Gulp 4,因为我们需要一些新的function,但是使用Gulp 4的预发布版本的所有说明都是使用github分支url。 这是违规的依赖: "gulp": "github:gulpjs/gulp#4.0", 这里是我尝试运行docker build -t user/project .时得到的错误docker build -t user/project . : npm ERR! Error: No compatible version found: gulp@'github:gulpjs/gulp#4.0' npm ERR! Valid install targets: npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.7","0.0.8","0.0.9","0.1.0","0.2.0","1.0.0","1.1.0","1.2.0","1.2.1","2.0.0","2.0.1","2.1.0","2.2.0","2.3.0","2.4.0","2.4.1","2.6.0","2.6.1","2.7.0","3.0.0","3.1.1","3.1.2","3.1.3","3.1.4","3.2.0","3.2.1","3.2.2","3.2.3","3.2.4","3.2.5","3.3.0","3.3.1","3.3.2","3.3.4","3.4.0","3.5.0","3.5.1","3.5.2","3.5.5","3.5.6","3.6.0","3.6.1","3.6.2","3.7.0","3.8.0","3.8.1","3.8.2","3.8.3","3.8.4","3.8.5","3.8.6","3.8.7","3.8.8","3.8.9","3.8.10","3.8.11","3.9.0","3.9.1"] npm ERR! at installTargetsError (/usr/lib/node_modules/npm/lib/cache.js:719:10) npm ERR! at /usr/lib/node_modules/npm/lib/cache.js:638:10 npm ERR! at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7) npm ERR! at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7 npm ERR! […]

docker集装箱不能克隆公共Github回购

我猜这是一个互联网连接问题,但是,可能有一些RSA公钥丢失。 我有这个Dockerfile: FROM node:4-onbuild COPY test-install-post-publish.sh /usr/src/app/ EXPOSE 8888 获取COPY到容器的bash脚本如下所示: #!/usr/bin/env bash cd # cd to home dir mkdir suman-test cd suman-test && rm -rf suman-test-projects && git clone git@github.com:sumanjs/suman-test-projects.git && cd suman-test-projects && ./test-all.sh 我运行容器,我得到这个: npm info it worked if it ends with ok npm info using npm@2.15.11 npm info using node@v4.6.2 npm info […]

你如何设置包含私人git仓库的docker图像的ssh密钥?

我试图得到一个docker形象build立,需要它克隆一个私人的github回购。

使用ansible创builddocker swarm

我使用github中的以下内容来了解​​docker swarm是如何通过https://github.com/patocox/ansible-swarm-do 我不确定我是否可以提出这个疑问,而不会在github上提出问题,所以我在这里。 我按照README.md中的步骤,在github上find几个可能的解决scheme之后,我还更改了我的hosts文件: [admin] IP_ADDRESS ansible_ssh_pass=vagrant ansible_ssh_user=vagrant [admin:vars] ansible_password=vagrant IP_ADDRESS是我在digitalocean上创build的液滴。 我继续得到这个错误: UNREACHABLE! => {"changed": false, "msg": "Authentication failed.", "unreachable": true} 我正在使用适当的API访问令牌执行README.md中给出的命令。 有人可以帮忙吗? 提前致谢。