Commit Graph

11 Commits

Author SHA1 Message Date
Henry Muru Paenga
2c154132b5 fix: Run dumb-init with --single-child for graceful termination (#4913) 2024-11-04 22:30:03 +00:00
Alexandru Marcencov
e9d89bb830 add script execution from docker-entrypoint.d folder (#3666)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-16 11:30:14 -08:00
Bruno Schaatsbergen
e9c0d72578 fix: use the non-root atlantis user instead of root (#3886)
* feat: use Atlantis user by default and get rid of gosu

* chore: set `DOCKER_CONTENT_TRUST=1`

* chore: fix chmod and chown

* feat: add a healthcheck to the debian and alpine images

* feat: removing setuid and setgid permissions prevents container privilege escalation and improve comments

* chore: remove setgid/setuid as we chown an entire directory

* chore: keep deps comment generic

* chore: grammar

* chore: remove redundant comment

* chore: rm DOCKER_CONTENT_TRUST

* chore: set uid and gid and remove passwd entry

* chore: revert gid and uid set as it's conflicting

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-08 20:25:08 -08:00
Daniel Piddock
bbb0ed2f00 Fix docker-entrypoint when called with atlantis (#3060)
Prior to v0.22.0 the container could be run with the command `atlantis
server`. However this was broken by #2770:
```
Error: unknown command "atlantis" for "atlantis"
```

This PR reverts to previous functionality and matches the comment.
Following calls all work again:
```sh
docker run atlantis server
docker run atlantis --help
docker run atlantis atlantis server
docker run atlantis atlantis --help
```
2023-01-27 09:17:45 -06:00
nitrocode
5773945b4b Separate alpine image (#2770) 2022-12-11 20:22:51 -06:00
Yurii Soldak
d6aa1e0eb3 Remove workaround for atlantis-data in entrypoint (#2334)
Fixes #2322 
See another PR (in helm-charts repo) that enables use of fsGroupChangePolicy instead.
2022-06-22 09:27:30 -07:00
Radon Rosborough
efdb3ff9cf Implement runWithUser/fsGroup within entrypoint (#1326)
Addresses https://github.com/runatlantis/helm-charts/issues/14
2022-05-16 09:46:29 -07:00
Jeppe Fihl-Pearson
19d41abc3c fix(docker): Multi-arch Docker images, attempt two (#2114)
* fix(docker): fix base image for multi-platform build (#2099)

* Correct indentation of run commands

* Split installation of packages into the ones needed at run time and build time

This allows us to now repeat the packages which need to be uninstalled again by
making use of a virtual package, which - when removed - removes the packages
installed as a dependency of it.

* Remove unnecessary `rm -rf /var/cache/apk/*` command

It's no needed when `apt add` is run with the `--no-cache` option.

* Add vertical spacing so it's clearer what is happening when

* Test the downloaded binaries to make sure they work on the platform

This can help find issues where binaries are downloaded for the wrong platform
compared to the architecture the Docker image is built for.

* Install dumb-init via apk

It's available as a package for Alpine Linux in version 1.2.5 as well, which
makes it easier to handle for the different architectures.

* Get git-lfs binaries in the right architecture for the Docker image

This makes use of the `TARGETPLATFORM` argument which automatically is
populated by Docker BuildKit with a string such as "linux/amd64" when the image
is being build for an x86_64 architecture.

* Install gosu for the right architecture

The `case` statement was taken from
https://github.com/BretFisher/multi-platform-docker-build as a way of
translating the platform name into what we needed for downloading gosu.

* fix(docker): fix installation of git-lfs in armv7 image (#2100)

This uses a similar pattern than what is used for `GOSU_ARCH` to map the
`TARGETPLATFORM` argument into the name of the architecture git-lfs use for
their release binaries, as "linux/arm/v7" otherwise would be mapped into "v7"
which is wrong.

* fix(docker): download Terraform and conftest versions maching image architecture (#2101)

* Remove Terraform versions from Docker image which don't have all archs

Terraform versions earlier than 0.11.15 does not have binaries available for
both amd64, arm64 and armv7, so are being dropped as we can't install the older
versions in all the architectures the Docker image is built for.

* Download Terraform version depending on the architecture Docker image is for

This avoids us having arm64 binaries for the ARM Docker images, which won't
work.

* Download arm64 conftest binaries for arm64 Docker image

This doesn't fix the armv7 Docker image because conftest doesn't have a binary
available for that, so it for now still downloads the x86_64 binary, which is
likely to not work - but it's the same as it did before.

* Correct path to dumb-init in docker-entrypoint.sh

The path changed after dumb-init was switched to be installed via `apk` rather
than downloaded directly as a binary.
2022-03-04 13:51:00 -05:00
Adil Sadik
b8372cd471 correctly identify atlantis subcommands in docker entrypoint 2019-12-11 12:21:44 -05:00
Thode Jocelyn
176bbd852d Allow arbitrary user to run atlantis 2018-11-26 17:49:10 +01:00
Anubhav Mishra
6b55b086cd Adding docker image and release scripts (#123)
* Adding docker image and release scripts

* Using circleci version 2

* now building dumb-init and gosu from source

* trying to fix e2e tests

* fixing working directory for circleci version 2

* start atlantis server and ngrok in the background

* Adding terraform to path and removing old decryption method for circleci

* adding terraform binary to the correct path

* ATLANTIS_URL is now being exported

* using circleci version 2 syntax to export variable

* using circleci version 2 syntax to export variable

* ngrok isnt working now

* Updating CHANGELOG

* Fixes after review and updated README.md
2017-08-16 13:29:51 -07:00