From f299aa54264ac1cb1ac48fbbbf930cf1562ceaeb Mon Sep 17 00:00:00 2001 From: PePe Amengual Date: Wed, 13 Dec 2023 18:45:20 -0800 Subject: [PATCH] docs: Custom container doc update (#4054) * Updating curl * Updating docs for custom image * Updating docs for custom image * fixing note * some style change * Update runatlantis.io/docs/deployment.md Co-authored-by: Rui Chen --------- Co-authored-by: Rui Chen --- runatlantis.io/docs/custom-workflows.md | 1 + runatlantis.io/docs/deployment.md | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/runatlantis.io/docs/custom-workflows.md b/runatlantis.io/docs/custom-workflows.md index f46981a620..3d8da5a566 100644 --- a/runatlantis.io/docs/custom-workflows.md +++ b/runatlantis.io/docs/custom-workflows.md @@ -177,6 +177,7 @@ by CDKTF will be add to the Atlantis modified file list. # Dockerfile FROM ghcr.io/runatlantis/atlantis:v0.19.7 +USER root RUN apk add npm && npm i -g cdktf-cli ``` diff --git a/runatlantis.io/docs/deployment.md b/runatlantis.io/docs/deployment.md index ba5cbdff66..05e91b5e70 100644 --- a/runatlantis.io/docs/deployment.md +++ b/runatlantis.io/docs/deployment.md @@ -554,9 +554,14 @@ If you need to modify the Docker image that we provide, for instance to add the FROM ghcr.io/runatlantis/atlantis:{latest version} # copy a terraform binary of the version you need + USER root COPY terragrunt /usr/local/bin/terragrunt ``` +Beginning with version 0.26.0, the Atlantis image has been updated to run under the atlantis user, replacing the previous root user configuration. This change necessitates adjustments in existing container definitions and scripts to accommodate the new user settings. In scenarios where additional packages from other images are required, users can temporarily switch to the root user by inserting USER root in the Dockerfile. Following the installation of necessary packages, it is advisable to revert to the atlantis user for initiating the Atlantis service. +Additionally, the /docker-entrypoint.d/ directory offers a flexible option for introducing extra scripts to be executed prior to the launch of the Atlantis server. This feature is particularly beneficial for users seeking to customize their Atlantis instance without the need to develop a dedicated pipeline. +**Important Notice**: There is a critical update regarding the data directory in Atlantis. In versions prior to 0.26.0, the directory was configured to be accessible by the root user. However, with the transition to the atlantis user in newer versions, it is imperative to update the directory permissions accordingly in your current deployment when upgrading to a version later than 0.26.0. This step ensures seamless access and functionality for the atlantis user. + 1. Build your Docker image ```bash docker build -t {YOUR_DOCKER_ORG}/atlantis-custom .