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

Closes issue #153 #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peter279k
Copy link

Changed log

@@ -86,6 +86,7 @@ function startContainer() {

docker exec -it $CONTAINER_NAME /bin/bash -c "echo NGINX_PORT=$nginxPort > $BENCHMARK_KIT_PATH/.env.local"
docker exec -it $CONTAINER_NAME /bin/bash -c "echo HOST_SOURCE_CODE_PATH=$hostSourceCodePath >> $BENCHMARK_KIT_PATH/.env.local"
docker exec -it $CONTAINER_NAME /bin/bash -c "chown -R phpbenchmarks:phpbenchmarks /var/www/benchmark"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this approach is about temporary fix.

If fixing permission issue persistently, it should modify docker/Dockerfile.

But I think it's not a great idea because it should release new Docker image version on Docker hub.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Releasing a new version on Duckerhub is not a problem, for now 4.0.0 is in BETA and could be modified if needed.

I'm not sure this is a good idea, because changing permissions on host could be dangerous: if path to source code is / because of a bug or something else, permissions for ALL files on your hosts are modified.

I'm thinking about a warning to tell the user to change permissions manually, with an example, but no doing it automatically.

Copy link
Author

@peter279k peter279k Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use Bash if syntax to check the permission and print warning message on this script and remind developers should use this command to change permission by themselves.

Do you have any suggested changes about above my suggestions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can try to do the thing, and on error, show the warning? it's easiest and will always work as intendend.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you have the suggested changes?

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

Successfully merging this pull request may close these issues.

Not seems to work at all
2 participants