简体   繁体   中英

Is it possible to edit/alter and save the code in a docker container or, failing that connect an editable app to a docker container, and run it

I need to make changes in a React/Node app, which because of problems/errors installing dependencies via npm or yarn, can only be acquired through docker.

The docker version has the correct dependencies installed and works correctly.

Please forgive my lack of understanding about docker.

My question is: how do I go about editing/altering this app, to make the changes required for my project? As far as I know the content of a docker container is read-only. Is there a way, despite this, to access/edit the node/react files and save these changes. Or, as another possibility, can I clone the app from the github repo and then attach/run this app within the docker container, using the the dependencies which work inside the docker container?

I have Remote-Containers installed on my vscode, but haven't been able to make head or tails of how to get that to work, or how it should work.

Would be very grateful for any pointers.

The typical method would be to make your changes to your application. Then commit those changes to a source code repository from which a new docker image would be built based off your code changes.

This new image would be deployed to your servers for use.

While it is possible to alter a running container through some intricate gyrations, those changes are transient and live only while that container is running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM