docker-build-tools-ci
docker-build-tools-ci copied to clipboard
Any way to run apt to install new tools in CircleCI?
I'd like to use this image when running things that require terminus in our CircleCI builds. But we have a need to run sudo apt update -y && sudo apt install -y dnsutils to grab our environment's log files as per https://pantheon.io/docs/logs#automate-downloading-logs. Maybe dnsutils could be provided in the build image by default?
Hi @davereid! I opened https://github.com/pantheon-systems/docker-build-tools-ci/pull/53
Pushed to the 6.x branch. Feedback appreciated.
We were able to work around the original issue by replacing the dig command with getent hosts and awk which worked out of the box.
for APP_SERVER in `getent hosts appserver.$environment.$TERMINUS_SITE_UUID.drush.in | awk '{print $1}'`; do
While adding dnsutils solves the original issue (awesome, thanks for the quick fix!), I think it's still a valid point that if anything else comes up, the container is set to use an unprivileged user which cannot run anything with sudo. That seems odd compared to most containers in my experience.
For example, I ran into issues mounting a prepared workspace in CircleCI to the /var/www/html directory in this Docker image, like we do in all of our other jobs. But because it was owned by the www-data user, the tester user does not have access to modify that directory.