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

feat: add script execution from docker-entrypoint.d folder #3666

Merged
merged 4 commits into from Nov 16, 2023

Conversation

marcencov
Copy link
Contributor

@marcencov marcencov commented Aug 12, 2023

what

To be able to execute some custom scripts at the entrypoint level, we can add this code that looks for files in /docker-entrypoint.d/ folder and executes all *.sh shell scripts. Also, we can place files inside if we need some orders in execution, for example, /docker-entrypoint.d/00-install-terragrunt.sh and /docker-entrypoint.d/10-install-awscli.sh.

why

As we need to repack every time docker image with atlantis and add some tools - terragrunt and awscli for us, better have a way to use original atlantis image, and mount files inside /docker-entrypoint.d. This files will be executed once when docker container start.

tests

references

As an example of how this realized in the official nginx docker container with docker-entrypoint.d folder
https://github.com/nginxinc/docker-nginx/blob/3aac9b12463cf031037f7e21b3857f9a4bec3f28/entrypoint/docker-entrypoint.sh#L13

@marcencov marcencov requested a review from a team as a code owner August 12, 2023 10:40
@jamengual
Copy link
Contributor

jamengual commented Aug 12, 2023 via email

@jamengual
Copy link
Contributor

@GenPage what do you think?

It seems to be that some other docker images do have this capability

@marcencov
Copy link
Contributor Author

@GenPage could you look to this PR? Thank you

@GenPage
Copy link
Member

GenPage commented Aug 31, 2023

I will take a look over the holiday weekend

@GenPage GenPage added this to the v0.26.0 milestone Aug 31, 2023
@GenPage GenPage added feature New functionality/enhancement installation Is about installing Atlantis waiting-on-review Waiting for a review from a maintainer docker Pull requests that update Docker code needs docs labels Aug 31, 2023
@marcencov
Copy link
Contributor Author

@GenPage how I can help you with this PR?

@jamengual
Copy link
Contributor

@marcencov can you fix the conflict? we will aim to push this to 0.27

jamengual
jamengual previously approved these changes Nov 15, 2023
@jamengual jamengual added waiting-on-response Waiting for a response from the user and removed waiting-on-review Waiting for a review from a maintainer labels Nov 15, 2023
@jamengual
Copy link
Contributor

/cherry-pick release-0.26

@jamengual
Copy link
Contributor

thanks for the contribution @marcencov

@jamengual jamengual merged commit e9d89bb into runatlantis:main Nov 16, 2023
23 checks passed
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code feature New functionality/enhancement installation Is about installing Atlantis needs docs waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants