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

Docker image should not require TARGET_URL #1247

Closed
wosc opened this issue Jan 28, 2020 · 3 comments · Fixed by #1338
Closed

Docker image should not require TARGET_URL #1247

wosc opened this issue Jan 28, 2020 · 3 comments · Fixed by #1338
Milestone

Comments

@wosc
Copy link

wosc commented Jan 28, 2020

Since you can specify the target host on the Locust class I don't see a need to having to specify it again with an environment variable. Could this restriction be removed, or am I missing something?

@heyman
Copy link
Member

heyman commented Jan 29, 2020

I agree. The Docker image should not require any environment variables. I'm not sure if it's a good idea to have the shell script that constructs the command line arguments for locust at all.

However there's an easy workaround. Just specify locust [arguments] as the COMMAND for docker run.

@max-rocket-internet
Copy link
Contributor

Just specify locust [arguments] as the COMMAND for docker run.

But you still need arguments to make it run correctly. Env vars are one quite regular way of doing this.

I think perhaps we should set /usr/local/bin/locust as the ENTRYPOINT and leave CMD unset. This is quite conventional and means the user must pass all required arguments to docker run, e.g:

docker run -p 8089:8089 --volume $PWD/dir/of/locustfile:/mnt/locust locustio/locust --locustfile /mnt/locust/locustfile.py --no-web -c 1000 -r 100

AWS CLI does this for example.

@heyman
Copy link
Member

heyman commented Apr 9, 2020

Ah, yes. ENTRYPOINT is what we should use of course :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants