Strider-CD / strider-docker-runner

Strider runner that uses Docker
34 stars 19 forks source link

HostConfig removed: unnable to run strider-docker #42

Closed xgalen closed 6 years ago

xgalen commented 8 years ago

Hi,

I'm testing this plugin and got an error in environment phase.

The # Creating docker container from strider/strider-docker-slave line appears but after that, Strider show this error:

`Error: (HTTP code 400) unexpected - starting container with HostConfig was deprecated since v1.10 and removed in v1.12``

strider.log:

Fri, 12 Aug 2016 12:08:36 GMT strider-docker-runner:create-container image is already locally
Fri, 12 Aug 2016 12:08:36 GMT strider-docker-runner:create-container [runner:docker] container id f3690c11361eb21139ffa46b355d3b05425ffd361db3a241c473ef805852e043
2016-08-12T12:08:36.760Z - info: [runner:docker] Job done with error. Project: mediasmart/XXX Job ID: 57adbc4400d174c80785ceaa
2016-08-12T12:08:36.760Z - info: [runner:docker] Job done without error. Project: mediasmart/XXX Job ID: 57adbc4400d174c80785ceaa

I've never used Docker before but I suspect there is a problem with the docker-image. Docker has updated the version to 1.12 few days ago, so maybe this needs to be fixed. I've searched the string HostConfig but no results found though.

Meanwhile I can install docker v1.10 and try, but I suppose it is better to fix this if possible.

Thank you in advance.

oliversalzburg commented 8 years ago

The runner was using a deprecated mechanism that was removed in 1.12. Please use the latest source snapshot instead. The issue should be resolved there.

xgalen commented 8 years ago

Sorry but how can I do that?

oliversalzburg commented 8 years ago

Perform these commands in the directory where Strider is installed (as the user that owns the files in the directory):

cd node_modules
rm -rf strider-docker-runner
git clone https://github.com/Strider-CD/strider-docker-runner.git
cd strider-docker-runner
npm install

When a new release is published to npm (CC @knownasilya) you're going to want to remove the git checkout again and re-install the package from npm. Otherwise future upgrades through the web UI will not work as expected.

xgalen commented 8 years ago

Oh ok! I understood about the docker-image... My fault.

oliversalzburg commented 8 years ago

The default Docker image that the runner is using is garbage anyway :P Depending on what you want to test, you might want to check out https://github.com/fairmanager/strider-docker-slave (fairmanager/strider-docker-slave on the Docker Hub) or roll your own image.

xgalen commented 8 years ago

Using the latest version now I got this error:

Fri, 12 Aug 2016 14:10:55 GMT strider-docker-runner:create-container Checking if image exists locally...
Fri, 12 Aug 2016 14:10:55 GMT strider-docker-runner:create-container Image is already locally
Fri, 12 Aug 2016 14:10:55 GMT strider-docker-runner:create-container Creating container...
Fri, 12 Aug 2016 14:10:55 GMT strider-docker-runner:create-container [runner:docker] container id 6c8a941c67b0a841fa155eaf8a2345692a741faafff34f0a0037166f8b0a7a06
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container running command n
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container with args [ '0.10' ]
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container got an event { data: 'Error: spawn ENOENT', event: 'stderr' }
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container got an event { event: 'stderr',
  data: 'execvp(): No such file or directory\n' }
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container got an event { code: -1, event: 'exit' }
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:run Job done. Killing container.
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container done with the container null { StatusCode: 137 }
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner:create-container Stopped the container!
Fri, 12 Aug 2016 14:10:56 GMT strider-docker-runner [runner:docker] Job done without error. Project: mediasmart/XXX Job ID: 57add8efa880db5a3975cb91
oliversalzburg commented 8 years ago

n probably doesn't exist inside the container image

xgalen commented 6 years ago

Closing this. @oliversalzburg was right.