Comments (9)
When I execute docker-compose, I got the following error.
You probably have to run docker in a VM to use it on Windows 10 Home - OS built on a fat layer of slippery 💩
So forgetting to mount your folder will cause that docker-compose
error (it happens to me from time to time).
Hope it helps (you or someone else), awesome repo Kumar 🔥
from dockerized.
Hmm, that is weird.
I don't have a Windows machine to reproduce on. As far as I know, Docker works best on Windows 10 Enterprise.
Very soon, will install a Windows Virtual Machine on my laptop and will let you know 🔥
Stay tuned!
from dockerized.
Hey, @remster85! Thanks for posting this issue.
I failed to reproduce this issue on Windows.
Can you try this?
$ docker run ec652f219f51 -p 3000:3000
Let me know what appears.
from dockerized.
Same error
PS C:\Users\user> docker run ec652f219f51 -p 3000:3000
[eval]:1
3000:3000
^
SyntaxError: Unexpected token ':'
at new Script (vm.js:88:7)
at createScript (vm.js:263:10)
at Object.runInThisContext (vm.js:311:10)
at Object.<anonymous> ([eval]-wrapper:10:26)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at evalScript (internal/process/execution.js:94:25)
at internal/main/eval_string.js:23:3
from dockerized.
I think I understood where the problem is.
The file system in Linux and Mac supports /
,
while in Windows \
is supported in the file URL.
https://github.com/KumarAbhirup/dockerized/blob/master/docker-compose.yml#L8-L11
Try changing the
context: packages/landingpage
👉 context: packages\landingpage
- ./packages/landingpage:/usr/src/app
👉 - .\packages\landingpage:/usr/src/app
.
I am not sure if .\
syntax is supported in Windows file system but I am guessing it does.
Let me know if it works.
from dockerized.
Hi @kumarabhirup, thanks for your help! I managed to get the
Welcome to the Dockerized App!
message using the url http://192.168.99.100:3000/.
I found this url from this discussion and from SOF. It's a docker-tools specificity.
Using docker-machine.exe ip
would return the IP address to target
=> 192.168.99.100
The volume section of docker-compose.yml does not have any effect whether I use \ or / for the paths or even when I removed it, it still works as long as I use the IP address http://192.168.99.100:3000.
I am wondering if those volumes are useful after all?
from dockerized.
Very glad you found a solution 🙌
Yes, volumes are very useful for local development.
If you want to work with Next.js Live Hot Reload, you need your volumes to be in sync with .next
and node_modules
...
I am not sure if Live Reload is working on Windows, you can try /
and \
for volumes and let me know what works!
from dockerized.
Does it mean that I would be able to change the content of the container dynamically ?
from dockerized.
To be honest, I am not sure about being able to "change the content of the container dynamically".
But I know that without volumes, live development will not be possible. It will work only in production then.
from dockerized.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerized.