Qiangong2
Qiangong2

Reputation: 159

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?

Upvotes: 0

Views: 68

Answers (1)

Timir
Timir

Reputation: 1425

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.

Upvotes: 2

Related Questions