https://www.runatlantis.io/ logo
Title
s

Sky Klein

04/28/2023, 6:59 PM
Hi everyone -- Has anyone seen this error when attempting to start the docker container ?
`Error: unknown flag: --gh-user
I understand it's missing that flag to take as an arg, but it's pulled verbatim from the install docs
p

PePe Amengual

04/28/2023, 7:04 PM
that is staring atlantis ? how are you doing that?
s

Sky Klein

04/28/2023, 7:06 PM
Yes when attempting to run the docker container using this pulled right from the guide
docker run <http://ghcr.io/runatlantis/atlantis|ghcr.io/runatlantis/atlantis> --gh-user=""--gh-token=""
With the args filled out with the real values, of course
image.png
Going to try and pull a much much older image
p

PePe Amengual

04/28/2023, 7:14 PM
you are building your own image?
s

Sky Klein

04/28/2023, 7:14 PM
Using the stock release
the docker-entrypoint.sh script show it should just pass the args
# If the user is trying to run atlantis directly with some arguments, then
# pass them to atlantis.
if [ "$(echo "${1}" | cut -c1)" = "-" ]; then
    set -- atlantis "$@"
fi
p

PePe Amengual

04/28/2023, 7:16 PM
if that was not working we will have 100k of angry people shouting at us….
s

Sky Klein

04/28/2023, 7:17 PM
So are you saying that is correct way to kick of the docker container ?
p

PePe Amengual

04/28/2023, 7:18 PM
I mean, those are the right flags
I do not run it like that, in my local
s

Sky Klein

04/28/2023, 7:19 PM
How should it be run ?
p

PePe Amengual

04/28/2023, 7:19 PM
for testing or for production?
s

Sky Klein

04/28/2023, 7:19 PM
If different can the install docs be updated ?
For "prod" in this case, not the ngrok enabled "testing"
I'm setting this up to test it, but as if it would be in prod
p

PePe Amengual

04/28/2023, 7:20 PM
ahh then you will deploy the image using a service like ECS, EKS etc
in that case you will need to pass all the config parameters for the server to start
s

Sky Klein

04/28/2023, 7:21 PM
Okay so the docs are misleading
p

PePe Amengual

04/28/2023, 7:21 PM
one of those is the gh-user, pass etc
link please
s

Sky Klein

04/28/2023, 7:21 PM
image.png
I'll take a look at the docs for ECS deployment and see what is then being sent
p

PePe Amengual

04/28/2023, 7:23 PM
we do not have docs for that
s

Sky Klein

04/28/2023, 7:23 PM
I'm seeing that as well
p

PePe Amengual

04/28/2023, 7:23 PM
what page are you referring to?
please paste the link
Clearly it expects args to run, but it would seem those are not the ones it wants passed, at least via a direct docker run scenario
I could go ahead and work backwards through the Dockerfile and the docker-entrypoint.sh script, but it seems to be more trouble than simply using the provided helm chart
I'll take a look at the testing as well
p

PePe Amengual

04/28/2023, 7:27 PM
I will skip that part of the docs
s

Sky Klein

04/28/2023, 7:27 PM
Since this will be run against github enterprise it would not need ngrok
p

PePe Amengual

04/28/2023, 7:27 PM
I can’t test it for you because I do not have docker in this machine
s

Sky Klein

04/28/2023, 7:28 PM
I'll mess around with it, but if you could update / remove that info from the docs
p

PePe Amengual

04/28/2023, 7:28 PM
we will update it if is wrong for sure( after testing)
if you are going to run in eks use the helm-chart
s

Sky Klein

04/28/2023, 7:31 PM
Will do. Thanks for the help
I figured it out
The docs lack the “server” flag
Basically the entrypoint script parses all text as a command
p

PePe Amengual

04/28/2023, 7:47 PM
ohhhh I see
s

Sky Klein

04/28/2023, 7:47 PM
and in the docs it lacked “server”
Which makes sense now
it also lacks --repo-allowlist
p

PePe Amengual

04/28/2023, 7:48 PM
that is an example, you are supposed to still look at all the other flags you need
I have like 20 flags
s

Sky Klein

04/28/2023, 7:49 PM
Yeah I understand how it works now, the docs just aren’t helpful
Using the container won’t really save me anytime
Based on how it looks to work for github you’d need at least
--atlantis-url="$URL" \
--gh-user="$USERNAME" \
--gh-token="$TOKEN" \
--gh-webhook-secret="$SECRET" \
--repo-allowlist="$REPO_ALLOWLIST"
p

PePe Amengual

04/28/2023, 7:51 PM
at a minimum yes
s

Sky Klein

04/28/2023, 7:51 PM
Like I said if you guys could update the docs under Docker could save someone else a lot of time