私はGitlab.comのCIとドッカーには新しくありません。 Gitlab.comランナー:外部レポからソフトウェアをインストールして実行するにはどうすればよいですか?
は、私は、だから私はそれがPythonのドッキングウィンドウの画像を指定していることがわかり、簡単な.gitlab-ci.yml
image: python:2.7-alpine
pages:
script:
- pip install -r requirements.txt
- pelican -s publishconf.py
artifacts:
paths:
- public
を構築するペリカン簡単なPythonの静的なブログを持っているが、その内のすべてのペリカン実行し、様々なPythonスクリプトをインストールするには、ピップを使用しています画像。
私の問題は、私自身のペリカンバージョンを実行したいということです。私はペリカンの私自身の支店を探すために私のrequirements.txt
ファイルを変更したが、これは今ではビルドしたときに、Gitlabのランナーが私に語っ
beautifulsoup4
markdown
smartypants
typogrify
git+https://github.com/jerryasher/[email protected]
pelican-fontawesome
pelican-gist
pelican-jsfiddle
pelican-neighbors
を失敗:
Running with gitlab-ci-multi-runner 1.9.0 (82714ae)
Using Docker executor with image python:2.7-alpine ...
Pulling docker image python:2.7-alpine ...
Running on runner-e11ae361-project-1654117-concurrent-0 via runner-e11ae361-machine-1484613050-ce975c76-digital-ocean-4gb...
Cloning repository...
Cloning into '/builds/jerrya/ashercodes'...
Checking out 532f8b38 as master...
$ pip install -r requirements.txt
Collecting git+https://github.com/jerryasher/[email protected] (from -r requirements.txt (line 5))
Cloning https://github.com/jerryasher/pelican.git (to hidden-cats) to /tmp/pip-72xxqt-build
Error [Errno 2] No such file or directory while executing command git clone -q https://github.com/jerryasher/pelican.git /tmp/pip-72xxqt-build
Cannot find command 'git'
ERROR: Build failed: exit code 1
さて、
Gitは」doesnの存在しているようだ。確かに上記の試みの前に、.gitlab-ci.yml
スクリプトにgitを使ってそのリポジトリをローカルに複製するという行に(失敗した)行を追加しました。
(私はpython:2.7-alpine
を使用していドッキングウィンドウの画像も何apt-get
を持っていないようです。)
私はgit
とpython
を含む独自のドッキングウィンドウのイメージと私が必要と何かを構築する必要がある、またはいくつかの「通常はありますGitlab.comのランナーにgit repoまたは典型的なlinuxパッケージリポジトリから外部プログラムをプルする方法はありますか?
私はこれを行うことができない場合は、この場合、ランナーの欠陥か、ドッカー画像の欠陥ですか?
おかげさまで、私は自分のドッカー画像を使用しています。それは、自分自身で楽しい冒険でした。 apt-getではなくapkを使って再試行します。私は公式のドッカー画像を使用して、必要に応じてymlでそれらを変更することを好むと思います。 –
@Jerryあなたはalpine linuxに基づいた画像を使用していますので、apt(またはbash、または他のもの)はありません。 python:2.7イメージはDebianをベースにしているので、あなたがよく知っているツールを提供しています。 –