CapRover app fails to find docker files path when deploying through Windows - windows

I am not very familiar with CapRover, but my company uses it to deploy local branches to staging server. I completed a task in a ruby and rails project and tried to deploy my branch using the caprover deploy command.
The build passes, but the deployed app webpage goes to error 502. In the App Logs, it prints repeatedly that it could not find docker-entrypoint.sh: /bin/sh: 1: docker-entrypoint.sh: not found
Now, I use Windows and my colleagues use Linux. They tried to replicate the deploy on their machines and it is passing normally. That's why the suspicions falls on Windows causing it with some characters incompatibility, like slashes or quotations marks... I don't know how can I try to correct this issue without modifying the project files that they are already using and risk causing some problems where it is working...
I am not sure if I provided enough information for someone to try to help me fix this issue? I will gladly try to provide more infos if required
Thanks

Related

Problem using docker compose file generated by VS 2019 on Mac

I have some kind of problem running multi container application on Mac.
I have 3 containers working together: 2 simply web api (.NET Core) and the official container RabbitMQ, the 2 api exchange events using RabbitMq service.
The application runs correctly running docker compose project from Visual Studio debug, when Api1 receive a POST it creates some data on DB and send message to Api2 using rabbit; Api2 receive the message sent by Api1, both api are visible on localhost... so far so good.
When I try to move the application from Visual Studio debug to Docker I get some problems, my idea was to use the docker compose file generated by VS on the CLI of docker (docker-compose up), following the sequence of action I've done:
1) Executing docker-compose up from Docker CLI, the build of the containers present in docker-compose failed (I was expecting VS just execute the same docker-compose up during debug, so I was expecting the same results, but probably I was wrong).
Solution: I've removed the build and use the images created by VS during previous debug test (still available in docker image local repository), this bypass the build problem (I have to investigate anyway the reasons, but let's move to next point)
2) After step 1 I can run docker-compose up without error, but the 2 containers with the 2 apis exit immediately with code 0, the RabbitMQ container doesn't have any problems and keep running as expected.
Solution: I've add stdin_open:true and tty:true in docker-compose to solve this strange issue
3) After step 2 I've executed docker-compose up and I was able to see all containers running correctly, but the 2 api containers are not reachable anymore on localhost (the related port are exposed and published), so I cannot send any POST request to the api anymore
I am not a big expert of Docker, but to run this simple multi container application took me much more time than expected, and still I have doubts and issues, any suggestions are more than welcome.
Thanks
I've found and fixed all issues, I report here because I suppose should be useful for other people:
1) This issue is related to a bug in VS 2019, the problem occurred when you include in a solution some projects (in my case class library) that are not in the same folder of the solution, this will generate wrong destination path for the COPY command in the dockerfile, for this reason the build fail.
I've reported issue to Microsoft:
Wrong Copy command in Dockerfile
meanwhile waiting for a fix you can put all the project used in a solution in the same solution folder, this avoid the wrong path generated in dockerfile and therefore the failure of the build procedure.
2) This issue is present only in images created by docker-compose in debug (normally you can recognize them by the tag "dev"), these image are useful for debug but do not use them outside VS debug.
Once fixed point 1 the creation of images using docker-compose was executed correctly and images are working as expected (without adding stdin_open:true and tty:true in docker-compose).
3) Also this issue using the images created on point 1 is solved.

Could not determine bundle identifier for xxxTest TEST_HOST

We do have troubles getting our CI to work with Xcode. We encounter the issue Could not determine bundle identifier for xxxTest TEST_HOST: some path that does not exist.
What we have done so far:
On the CI Machine we are able to run all tests on the device, but if we trigger it with a commit the CI does end in that error.
We had that issue on other machines too, when we tried to run the tests of the application. We fixed that by cleaning the machine and reboot the devices.(Had do fix some scheme settings) Not we can run all tests but we run into the issue sometimes without any reason.
We also double checked the schemes. The Host Application is set in every Tests scheme to the App itself.
Our project has the following targets:
App
App Unit Tests
App UI Tests
AppeareanceKit (Module)
AppeareanceKit Unit Tests
Models (Module)
Models Unit Test
Found solution:
Diabling the Tests except the App UITest
Run the tests once
Enable all Tests
Run the tests
Question:
What is happening there? How can we prevent from having that issue over and over again?
Known questions:
Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could not find test host
Tests stop working under xcode 8 TEST_HOST error
So after ages of having this issue, we could find the right checkbox to fix this issue.
It somehow sounds weird but the issue was the configurations for the command-line builds inside of the Project settings.
I assume this happens because we always test against the debug configuration and it was set to release. Therefore it did the wrong build for the test host.
This does set the defaultConfigurationName inside of the {projectname}.xcodeproject.
Please comment if you have any more insights of this.
In my app I found a solution.
The problem was of course in the test target.
I hope that this solution will work for you too. Go to your test target build settings.
Search for test host.
In my case this testHost was looking like
build/{buildConfigurationName}-iphoneos/{schemeName}.app/{appName}
Which is wrong as the actual path must be
build/{buildConfigurationName}-iphoneos/{schemeName}.app/{schemeName}
so if you have a build configuration called Alpha, in your app named MyApp, with a scheme called MyApp-Alpha the test host path should be
build/Alpha-iphoneos/MyApp-Alpha.app/MyApp-Alpha
it was
build/Alpha-iphoneos/MyApp-Alpha.app/MyApp
I hope this can help... unfortunately this issue appears in many cases.
One reason to have this error is that your info.plist of your target is not in its path. So if you moved it or removed the reference to it, you may get this error.
So if you moved it, put it back into its place or path. if you removed the reference to it, add it again, close and reopen the project.

Is there any way to bypass or script Heroku's login prompt?

The Heroku Toolbelt's login prompt has started causing my continuous integration job to fail. I'm guessing something changed in a recent version, but since this project had been on the back-burner for a few months, I'm not sure exactly when that happened. I'll also admit that I don't remember how I had this working in the first place. It's possible that I did something similar to my answer below, but have no recollection of that.
Is there any way to script completion of the login prompt or bypass it entirely using environment variables/config?
Version information:
heroku-toolbelt/3.42.40 (x86_64-linux) ruby/2.2.2
heroku-cli/4.27.26-693efcb (amd64-linux) go1.6
I've tried manually logging into Heroku on the CI server, which creates a .netrc and copying that into my image, but it appears to be ignored.
Unfortunately, the only solution I was able to come up with was to build the Docker image, create a container, run heroku login inside of it, commit the changes and use the new image in my CI workflow.

Using Heroku with Cyrillic user folder in Windows

This is quite specific problem: developer's machine with Win 7 Ulttimate has cyrillic user folder name, which cannot be changed due to the plenty of another programs rely on this path.
Need to deploy php-app on Heroku.
Using the Heroku toolbeit on this computer, I found while "heroku create" the follow error - "...no such file or directory open...".
By the simple experiment, I found that problem is in cyrillic name of user folder. Undeк another user's account is OK. So, question - is there any case to tune the Heroku fot correct work with such cyrilic enviroment ?
A fix for cyrillic characters in usernames has been pushed to https://toolbelt.heroku.com/ specifically for this problem. Please run the installer again and retry the heroku create command. It should work starting with heroku/toolbelt/3.42.25 (version information is available from heroku version)

What can be the impact of updating /etc/authorization file in mac os x 10.8.2

We are using Bamboo for CI & UIAutomation testing in our project. For that we use scripts that builds the xcode project, creates .app file and then launch Instruments to run automation tests.
In our script for running automation scripts, we are getting following error:
"Failed to authorize rights (0x2) with status: -60007."
I searched for this error, and I got the solution saying updating "system.privilege.taskport" in "etc/authorization" file to allow root will solve the problem. Actually it did solved my problem.
But, after that when the system was broken. I mean, I tried to restart it, and it didn't boot.
I haven't changed anything in the system. The only way recovering the machine was reinstalling it.
Now, with my new machine I am again getting the same error for the script. Can anyone help me to resolve it. without changing anything in system file.
Also can anyone confirm the impact of changing "etc/authorization" file

Resources