Slackbot
12/13/2023, 1:50 PMAlex Mussell
12/13/2023, 2:07 PMBEFORE:
- name: Make AWS conf readable by Atlantis
community.docker.docker_container_exec:
container: atlantis
command: /bin/bash -c "chown atlantis:atlantis /home/atlantis/.aws/"
Becomes:
AFTER:
- name: Make AWS conf readable by Atlantis
community.docker.docker_container_exec:
user: root
container: atlantis
command: /bin/bash -c "chown atlantis:atlantis /home/atlantis/.aws/"Alex Mussell
12/13/2023, 2:08 PMFROM <http://ghcr.io/runatlantis/atlantis:v0.27.0-alpine|ghcr.io/runatlantis/atlantis:v0.27.0-alpine>
USER root
ENV VIRTUAL_ENV=/opt/venv
RUN apk add --no-cache python3 python3-dev py3-pip libc-dev libffi-dev gcc jq yq
RUN python3 -m venv $VIRTUAL_ENV
## We can replace source <venv>/activate by setting the appropriate environment variables: Docker's ENV command applies both subsequent RUNs as well as to the CMD.
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip3 install --upgrade pip
RUN pip3 install --no-cache-dir \
'msal==1.4.3' \
'awscli'
USER atlantis <--------------- ADD THISRB
12/13/2023, 3:11 PMAlex Mussell
12/13/2023, 3:24 PMAlex Mussell
12/13/2023, 3:40 PMVinicius Oliveira
12/13/2023, 6:16 PMUSER root solved my issue. I will add the USER atlantis at the end as well to avoid any future issues. Thanks for sharing the solutionRB
12/13/2023, 8:43 PMRB
12/13/2023, 8:44 PMPePe Amengual
12/13/2023, 8:44 PMPePe Amengual
12/13/2023, 8:44 PMPePe Amengual
12/13/2023, 10:02 PMPePe Amengual
12/13/2023, 10:15 PMPePe Amengual
12/13/2023, 10:16 PMRB
12/13/2023, 10:16 PMRB
12/13/2023, 10:16 PMPePe Amengual
12/13/2023, 10:16 PMRB
12/13/2023, 10:17 PMDylan Page
12/13/2023, 10:18 PMDylan Page
12/13/2023, 10:18 PMPePe Amengual
12/13/2023, 10:27 PMSince 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.Dylan Page
12/13/2023, 10:27 PMRB
12/13/2023, 10:31 PMRB
12/13/2023, 10:31 PMRB
12/13/2023, 10:32 PMPePe Amengual
12/13/2023, 10:32 PMPePe Amengual
12/13/2023, 10:32 PMRB
12/13/2023, 10:32 PMRB
12/13/2023, 10:33 PMPePe Amengual
12/13/2023, 10:33 PMDylan Page
12/13/2023, 10:36 PMPePe Amengual
12/13/2023, 10:38 PMAlex Mussell
12/18/2023, 9:21 AM