gocd / docker-gocd-agent-docker-dind

Apache License 2.0
9 stars 28 forks source link

v19.3.0 image is not starting: java error #4

Closed volodymyr-mykhailyk closed 5 years ago

volodymyr-mykhailyk commented 5 years ago

When trying to start v19.3.0 image receiving an error:

/go-agent/agent.sh: line 151: /gocd-jre/bin/java: No such file or directory

v19.2.0 works perfectly.

Command used to run image: docker run --rm -it gocd/gocd-agent-docker-dind:v19.3.0 Full log:

docker run --rm -it gocd/gocd-agent-docker-dind:v19.3.0
/docker-entrypoint.sh: Creating directories and symlinks to hold GoCD configuration, data, and logs
$ mkdir /go
$ chown go:go /go
$ mkdir /godata
$ chown go:go /go
$ mkdir -v /godata/config
created directory: '/godata/config'
$ chown go:go /godata/config
$ ln -sv /godata/config /go/config
'/go/config' -> '/godata/config'
$ chown go:go /go/config
$ mkdir -v /godata/logs
created directory: '/godata/logs'
$ chown go:go /godata/logs
$ ln -sv /godata/logs /go/logs
'/go/logs' -> '/godata/logs'
$ chown go:go /go/logs
$ mkdir -v /godata/pipelines
created directory: '/godata/pipelines'
$ chown go:go /godata/pipelines
$ ln -sv /godata/pipelines /go/pipelines
'/go/pipelines' -> '/godata/pipelines'
$ chown go:go /go/pipelines
$ cp -rfv /go-agent/config/agent-bootstrapper-logback-include.xml /go/config/agent-bootstrapper-logback-include.xml
'/go-agent/config/agent-bootstrapper-logback-include.xml' -> '/go/config/agent-bootstrapper-logback-include.xml'
$ chown go:go /godata/config/agent-bootstrapper-logback-include.xml
$ cp -rfv /go-agent/config/agent-launcher-logback-include.xml /go/config/agent-launcher-logback-include.xml
'/go-agent/config/agent-launcher-logback-include.xml' -> '/go/config/agent-launcher-logback-include.xml'
$ chown go:go /godata/config/agent-launcher-logback-include.xml
$ cp -rfv /go-agent/config/agent-logback-include.xml /go/config/agent-logback-include.xml
'/go-agent/config/agent-logback-include.xml' -> '/go/config/agent-logback-include.xml'
$ chown go:go /godata/config/agent-logback-include.xml
$ chown go:go /go/config/autoregister.properties
/docker-entrypoint.sh: Running custom scripts in /docker-entrypoint.d/ ...
$ exec /usr/local/sbin/tini -- /usr/local/sbin/gosu go /docker-entrypoint.sh /go-agent/agent.sh
$ exec /go-agent/agent.sh
/go-agent/agent.sh: line 151: /gocd-jre/bin/java: No such file or directory

Sorry if submitted the issue to wrong repository but one referenced in Readme is archived

volodymyr-mykhailyk commented 5 years ago

https://github.com/gocd/docker-gocd-agent-dind/blob/f94383f7b3d00c927a3d4b23d86416bd3f996aec/Dockerfile#L60 previously jre was installed as alpine package now via direct download. Seems like some permission errors

varshavaradarajan commented 5 years ago

@volodymyr-mykhailyk - did you build the image on your own or is this what you pulled from dockerhub? I pulled v19.3.0 from dockerhub. It does not create /gocd-jre as expected and uses java 8.

cc @ketan

bdpiprava commented 5 years ago

@volodymyr-mykhailyk - There was an issue with the published gocd/gocd-agent-docker-dind:v19.3.0 image. This issue has been fixed now. Please pull the image again and let us know if it resolves the issue.

@volodymyr-mykhailyk - The Dockerfile is migrated to the official GoCD repository https://github.com/gocd/gocd/blob/master/buildSrc/src/main/resources/gocd-docker-agent/Dockerfile.agent.ftl

volodymyr-mykhailyk commented 5 years ago

@bdpiparva After force redownload - problem is solved. Thanks a lot.

varshavaradarajan commented 5 years ago

@bdpiparva - the Dockerfile does not correspond with the image downloaded from Dockerhub. I haven't verified for other distros.

bdpiprava commented 5 years ago

@varshavaradarajan - Yes, That has happened because of https://github.com/gocd/gocd/pull/6082 migration. Will be fixed soon