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

Containers need to be removed if there is an error executing bash scripts #107

Open
sachith-1 opened this issue Mar 18, 2021 · 0 comments · May be fixed by #103
Open

Containers need to be removed if there is an error executing bash scripts #107

sachith-1 opened this issue Mar 18, 2021 · 0 comments · May be fixed by #103

Comments

@sachith-1
Copy link

sachith-1 commented Mar 18, 2021

For example, if we ran npm start func start basically three are two things happening,
1. It will create a container from a given image for example its cloudlibz/clocal-gcp-function:latest
2. Next it will run the specified bash script inside the container.

  • But If there is an error running the commands inside the container, the program will show an error and stop.

image

  • But the container didn't stop or removed, it still running with the given port. ( docker ps )

image

  • Next, if the user solves the problem when running the bash commands, but there will be another problem if he tries to run the npm start func start again because the old container is still running on the same port as the new container.

image

  • Also after running 'npm start func start' for the 2nd time the container will also create and it's not running. ( docker ps -a). that mean program will show an error after creating the container and won't run the scripts inside the container.

  • To stop this user will have to remove the container manually.
    image

  • To solve this issue (both issues) I removed the container if there is an error running the commands inside the container or if there is an error after the container created in every cloud service.

  • Issue was addressed with PR README.md updated with correct repo url ,remove container function, status command added #103

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