Tag: ssh

X11从Windows进入Docker

通过使用SSH连接,可以将Docker的X11转发连接“桥接”到Windows主机上吗? 在Windows端,我安装了Vagrant,VirtualBox和XMing。 在VirtualBox上有一个CoreOS,为Docker镜像提供服务。 工作是通过使用由Vagrant(10.0.2.2)公开的IP将显示直接显示到Windows机器上: docker run -e DISPLAY=10.0.2.2:0.0 someimage firefox 但是这不使用SSH隧道,所以它只能在可以从Docker容器访问Windows机器的本地环境中工作。 根据我的理解,我需要将显示从Docker容器内部转移到外部,CoreOS主机,然后从那里转移到SSH X11入口点。

jenkins用docker工具返回状态码128

我有一个与Jenkins和build设项目的问题:昨天一切工作find,没有任何configuration没有改变,没有插件或jenkins已被更新。 这是我的工作输出: ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch –tags –progress git@git.XXX:AAA/0YYY7.git +refs/heads/*:refs/remotes/origin/* –depth=1" returned status code 128: stdout: stderr: /tmp/ssh2047466924933280956.sh: 6: /tmp/ssh2047466924933280956.sh: ssh: not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) […]

在docker上错误“No module named MySQLdb”

我想连接我的docker应用程序容器到本地的MySQL,但我得到一个错误,“没有名为MySQLdb的模块”。 我的config.py文件是: import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_MIGRATE_REPO = os.path.join(BASEDIR, 'db_repository') SQLALCHEMY_DATABASE_URI = 'mysql+mysqldb://root:@192.168.0.29/test' DEBUG = True 我的docker文件是: FROM python:2.7-slim WORKDIR /app ADD . /app RUN pip install -r requirements.txt EXPOSE 9999 ENV NAME flaskCrudAPI CMD ["python", "run.py"] 我的requirements.txt文件包含以下内容: virtualenv flask mysql-server flask_sqlalchemy flask_migrate sqlalchemy 我使用这个命令运行应用程序: docker run -p 9999:9999 flaskcrud 但是我得到关于mysqldb模块没有find这个错误。 我已经尝试将python-mysql和其他一些包添加到requirements.txt文件,但是,即使在安装命令下,容器的构build也会失败。 我究竟做错了什么? 或者我应该怎么做?

在容器中创buildssh密钥被认为是不好的做法?

我有一个容器,从github拉出一个公共回购,它需要SSH密钥在里面。 我正在考虑在容器内部生成ssh密钥,但是我看到有些post认为在容器内部留下ssh密钥会增加安全漏洞。 所以我想知道这里最好的办法是什么? 使用VOLUME API将密钥留在主机文件系统中 在容器中生成密钥并将其留在那里 使用COPY或ADD API将密钥从主机复制到容器 提前致谢!

从Windows使用公钥authentication连接到远程docker计算机

我试图从Windows Server 2008连接到远程Docker主机(Ubuntu 16.04),所有这些都在AWS EC2上。 需要在单个EC2实例中运行docker,所以我使用了一个通用驱动程序。 我正在使用一个公共密钥文件(.pem),它适用于ssh(从putty提取ppk和从linux环境sshing),我得到: Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "xx.xx.xx.xx:2376": dial tcp xx.xx.xx.xx:2376: connectex: No connection could be made because the target machine actively refused it. 这可能吗? 我应该将pem文件转换为另一种格式吗? 我试过将证书转换为一些格式,并没有工作。

厨房login失败:无法parsing主机名

我正在使用testing厨房,并创build了一个Centos泊坞窗图像。 我的.kitchen.yml文件看起来像这样 我已经执行了kitchen create和kitchen converge命令,然后查看与kitchen list创build的文件 当我使用厨房创造时,我也有一个docker形象 现在我已经拥有了我想要运行该映像的所有内容,并且正在使用kitchen login命令,并且收到以下错误消息 这是login到docker集装箱的正确过程吗? 或者我在.kitchen.yml文件中做错了什么? 注意:我已经研究了各种问题,但最终没有任何帮助,我在这里问。 编辑:我已经解决了上述问题,并面对这个新的

Docker容器通过跳转SSH隧道连接到远程数据库

我试图连接到远程SQL,在我们之间有跳转服务器。 通常情况下,我可以从datagrip访问数据库,一旦我从bash跳转到服务器。 我试图通过docker容器连接到远程数据库。 我已经尝试了不同的Docker集线器映像。 跳转服务器侦听本地端口11433并转发远程SQL数据库端口1433。 这是我的docker-compose.yml version: '2' services: test-db: image: gsengun/flyway-mssql volumes: – ./sql:/flyway/sql command: localhost 11433 user Password db container_name: testDb 这是我的docker文件 。 FROM calendar42/python-geos COPY ./svc/requirements.txt /domain/requirements.txt COPY ./requirements.txt /api/requirements.txt RUN pip install -U pip RUN pip install -r /api/requirements.txt WORKDIR /api/svc/ 我不确定,我失去了什么帮助或方向感谢。

如何在Docker中使用gpicview?

我正在AWS ubuntu实例上运行docker容器。 它看起来像这样: Ubuntu 16.04>外部tmux会话> nvidia-docker>内部tmux会话 我configuration了我的SSH,以便在外部tmux会话中运行: gpicview path_to_image.jpg 一切正常。 但是,如果我尝试在内部会话中使用它,它会中断。 所以问题是: 我需要使用哪个标志(nvidia)docker来允许x-windows转发 ?

Jenkins在RaspberryPi 3(rpi-jenkins)的Docker中连接问题,当克隆一个Bitbucket Git Repo

我目前在Docker的Raspi上玩Jenkins(使用dilgerm / rpi-jenkins图片)。 现在我连接到一个Bitbucket Git存储库有一个问题。 当进入版本库url,我得到(众所周知的)“无法连接到存储库” 当使用https和提供凭据(通过jenkins凭据存储),我得到的错误。 当使用ssh并正确configuration密钥时,我得到相同的错误。 现在我想知道是否必须configurationdocker容器的ssh-key(对于Jenkins用户?)。 目前,我已经实现了主机Raspi本身的关键。 或者可能需要在启动时configuration/发布Docker容器的ssl端口(-p参数)? 任何帮助赞赏。

如何访问docker-compose中的私有GitHub存储库?

这是我的docker-compose.yml文件: version: '2.1' services: users-db: container_name: users-db build: git@github.com:lukalopusina/flask-microservices-users.git#master:project/db volumes: – '~/.ssh/github:/root/.ssh/id_rsa' ports: – 5435:5432 # expose ports – HOST:CONTAINER environment: – POSTGRES_USER=postgres – POSTGRES_PASSWORD=postgres healthcheck: test: exit 0 这是Dockerfile: FROM postgres # Disable checking for known_hosts (maybe not working) RUN mkdir /root/.ssh && echo "StrictHostKeyChecking no " > /root/.ssh/config # run create.sql on init […]