Coder Social home page Coder Social logo

Comments (6)

idevz avatar idevz commented on May 13, 2024

@wanghaisheng 你好,直接将宿主机上的代码目录挂载到镜像里不行吗?

from vanilla.

wanghaisheng avatar wanghaisheng commented on May 13, 2024

@idevz docker run -d -p 9110:9110 -v=pwd/demo:/tmp/vdemo -w=/tmp/vdemo edwin/vanilla-openresty-alpine
这样子覆盖不了container里vanilla new vdemo生成的代码

from vanilla.

idevz avatar idevz commented on May 13, 2024

@wanghaisheng 你的问题解决了?

from vanilla.

wanghaisheng avatar wanghaisheng commented on May 13, 2024

@idevz 暂时定位成docker-machine的问题 这货底层使用boot2docker镜像 导致宿主机(我用的ubuntu)的目录挂载到container里存在问题 暂未找到解决方案。。

from vanilla.

idevz avatar idevz commented on May 13, 2024

@wanghaisheng 嗯哪,后续有结果咱们再通气

from vanilla.

wanghaisheng avatar wanghaisheng commented on May 13, 2024

@idevz
macbook
➜ ~ docker-machine version
docker-machine version 0.6.0, build e27fb87
➜ ~ boot2docker version
Boot2Docker-cli version: v1.8.0
Git commit: 9a26066

docker-machine create --driver virtualbox dev 时dev中会自动挂载宿主机的user目录到镜像里的/User目录
参考
运行docker container的时候只需要改写一下文件目录 如下
docker run -t -i -v /Users/wanghaisheng/workspace/docker-for-fun/docker-openresty/vanilla-alpine/demo1:/tmp/vdemo/ -w /tmp/vdemo -p 9110:9110 edwin/vanilla-openresty-alpine /bin/sh
但是宿主机和镜像里的文件同步还是有问题
使用此项目即可解决文件同步的问题
https://github.com/brikis98/docker-osx-dev
···

docker-machine create --driver virtualbox
eval "$(docker-machine env )"
docker-osx-dev install
cd /foo/bar
docker-osx-dev
···

from vanilla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.