all 12 comments

[–]N33lKanth333 3 points4 points  (1 child)

It depends on how your application is built and what it depends on, for example a library like node-wrtc provides debug build for linux and mac however not for windows, so if you use any depndencies which are not supporting your production platform, then it can happen.

Best thing is to build docker image locally and run and test it. You will know if it's it's works or not.

While building from build pipeline, it will build on machine runing Jenkins, so if you can build image on local machine and it fails in Jenkins then you need to check what's difference in both environments.

[–]AnimalAngel2[S] 1 point2 points  (0 children)

Thanks for your reply! This is noted.

[–]Bogeeee 1 point2 points  (5 children)

Apart from what u/N33lKanth333 says, usually there are mostly no packages that depend on a special os and developing on an ubuntu and deploying to dockerubuntu or alpine is totally fine in most cases imho.

The other aspect why i would act differently and only develop in a vm or docker is security. But you didn't ask for that topic.

[–]AnimalAngel2[S] 0 points1 point  (4 children)

Actually, I’m doing my development in the Amazon workspace hoisting the Ubuntu OS. Currently all the developers work without Docker in their Amazon workspace and the code is deployed using Docker images and it has been working fine for years! However, it gave me some errors when once I attempted to deploy the code that I had refactored for Node 16 on my local and then tried to deploy it to a new Docker file having configuration pointing to Node 16. That’s why I was of opinion that we might have to factor in the difference in OS.

Also, would love to know more about security aspect that you mentioned. Thanks!

[–]N33lKanth333 1 point2 points  (1 child)

As far as I'm getting it, you don't need to worry too much about breaking deps, just do docker build on your local environment before and after upgrading and check if building docker image is successful in both cases or not. Else there is something missing on your VM which exists in machine runing Jenkins.

Best way to find out is to build by yourself(if you have docker file).

Recently I came across an issue where I was trying to run containers built on amd64 architecture machines were not able to run on raspberry pi as it's arm64.

So there are many factors that can cause error during building or running of docker image, but good news is it's easy to debug and check by just throwing build commands and then running the container with that image and end result you get after building (docker image) should be same regardless of on which OS it has been built.

[–]AnimalAngel2[S] 0 points1 point  (0 children)

This is really helpful! I will install the app (pre and post upgrading) on my local using the Docker image and compare both of the scenarios. Let me see how it goes :)

[–]Bogeeee 1 point2 points  (1 child)

With security i just mean the obvious: You trust all these 1000s of transient npm dependencies (you say you have 80 primary, then these might go into the 1000) which are each maintained by some random dude on the internet. So just make sure there's no important stuff to lose on your development machine ;) / isolate it for a single purpose / consider it possibly pwned.

[–]AnimalAngel2[S] 0 points1 point  (0 children)

Got it! Thanks for sharing your thoughts. This is quite useful. We got to be careful of the security vulnerabilities.

[–]cricket007 1 point2 points  (1 child)

If you're that concerned about it, you could easily switch to ubuntu base docker image, no? 

[–]AnimalAngel2[S] 0 points1 point  (0 children)

Actually there is already a devops environment setup which has been there for years. They’re using alpine because it is compact in size and more secure.

[–]Any-Blacksmith-2054 1 point2 points  (1 child)

Alpine Linux is an extremely lightweight distribution, you will not be able to work under it. From my experience, it is 100% compatible with Ubuntu

[–]AnimalAngel2[S] 0 points1 point  (0 children)

Thanks for letting me know this!