Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Custom container doc update #4054

Merged
merged 8 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runatlantis.io/docs/custom-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
7 changes: 7 additions & 0 deletions runatlantis.io/docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,16 @@ 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
```

Since version `0.26.0` the atlantis image now uses the `atlantis` user to run atlantis instead of the root user. Previous container definitions and script might need to be adjusted to use the `atlantis` user instead of `root`. If you need to include packages from other images you can switch to the `root` user using `USER root` in your docker file and once you are done installing packages you can switch back to the atlantis user to start atlantis.

It is possible also to use the `/docker-entrypoint.d/` directory to add aditional scripts that you might want to run before the atlantis server starts. This is particulary useful if you want to customize the instance without building your own pipeline for it.

**NOTE:** The atlantis data directory needs to be readable by the `atlantis` user instead of `root`, earlier versions used to use `root` instead, you might have to update permissions in your current deployment if you are upgrading to `>0.26.0`.
jamengual marked this conversation as resolved.
Show resolved Hide resolved

1. Build your Docker image
```bash
docker build -t {YOUR_DOCKER_ORG}/atlantis-custom .
Expand Down