简体   繁体   中英

How do I build an application with a docker image?

I have a docker image that I am trying to use to cross-compile an application for Windows. However, whenever I enter the docker image, it does not show my filesystem, so I cannot reach my source code.

How do I build with a docker image? Or am I missing something?

If I understand right, the image contains your development environment, and you only need a way for the container to see your code on the host machine at runtime. The answer is in the question then.

Just start your container with the source directory mounted:

docker run --rm -it -v%my_src_dir%:/workspace centos:6.6 /bin/sh

Then inside the container, you cd /workspace to continue development.

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