Comments (5)
I'd probably try adding scripts in /docker-entrypoint.d
and see if that works as expected? See
docker-gocd-agent/docker-entrypoint.sh.erb
Lines 113 to 124 in 2b25324
from docker-gocd-agent.
Oh maybe I've interpreted it wrong... I thought /docker-entrypoint.d
was only run as root?
I want my scripts to be run as the go
user (to be set for pipeline jobs).
I thought this line made it run /goagent/agent.sh
as the go user, using gosu
:
docker-gocd-agent/docker-entrypoint.sh.erb
Line 126 in 2b25324
...but maybe it's running itself again and thus loading /docker-entrypoint.d/
files, also as go
?
from docker-gocd-agent.
This is what led me to configure the /etc/default/go-agent
file from before:
Users can override default startup arguments for a GoCD agent in a Linux machine by editing the file etc/default/go-agent.
from docker-gocd-agent.
@ketan Looking at the logs of my container, I see this happening during startup:
/docker-entrypoint.sh: Creating directories and symlinks to hold GoCD configuration, data, and logs
[...]
$ 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
/docker-entrypoint.sh: line 57: /usr/local/bin/nohup.out: Permission denied
$ exec /go-agent/agent.sh
[Thu Sep 06 11:18:35 GMT 2018] Starting process:
[...]
...thus it doesn't seem like it runs those files in /docker-entrypoint.d
as go
, but only as root
?
Any suggestions of what I could try?
from docker-gocd-agent.
Here's how things have been designed:
- Stuff in
/docker-entrypoint.d
executes asroot
user, intentionally so. Use this to provision, install packages etc. - Stuff in
/etc/default/go-agent
is sourced from the agent startup script (/goagent/agent.sh
). Use this to ensure that variables are available to the agent process (which runs as thego
user). This file can be volume mounted (or baked into the image, as the case may be).
from docker-gocd-agent.
Related Issues (20)
- /home/go not created for debian 7,8, ubuntu 12.04, 14.04, 16.04 agents HOT 1
- Provide a option to write log on stdout HOT 3
- AGENT_AUTO_REGISTER_* env vars not applied during run ? HOT 8
- Doesn't work ! HOT 1
- Something is wrong with the latest tag HOT 4
- Why do you enforce the GO_SERVER_URL to be https? HOT 2
- GoCD agent doesn't seem to connect / work HOT 6
- Agent unable to connect to Server hosted on docker container HOT 2
- docker agent doesn't connect with docker compose? HOT 2
- Can't change user inside container (alpine-3.5)
- Cloning Materials Stalls HOT 1
- Can't get the the gocd-agent to connect to the server with Docker compose HOT 1
- Upgrade git to be 1.9.1 on all agent images shipping with a lower version HOT 2
- Provide latest fedora as an image HOT 5
- Provide debian 9 image
- Upgrade git to 2.17.1 for CVE 2018-11234 and CVE 2018-11235 HOT 1
- agent binaries url not reachable HOT 2
- The gocd-agent-docker-dind image doc has a little mistake HOT 2
- perl: warning: Setting locale failed.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-gocd-agent.