Last active
April 22, 2019 21:29
-
-
Save szanata/d7ee803055de9fd274b9a6e08f09c54f to your computer and use it in GitHub Desktop.
Create docker alpine on windows and avoid errors of synchronization on the volumes IO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Starting docker" | |
:: Some references | |
:: https://github.com/docker/for-win/issues/969 | |
:: https://forums.docker.com/t/volume-mounts-in-windows-does-not-work/10693/25 | |
set /p PWD="Enter your user password: " | |
DOMAIN="your compute name" | |
USERNAME="your username" | |
docker volume create ^ | |
--driver local ^ | |
--opt type=cifs ^ | |
--opt device=//10.0.75.1/D/my/path/ ^ | |
--opt o=rw,relatime,vers=2.0,sec=ntlmsspi,cache=strict,username=%USERNAME%,pass=%PWD%,domain=%DOMAIN%,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0777,iocharset=utf8,nounix,serverino,mapposix,nobrl,mfsymlinks,noperm,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 ^ | |
shared_volume | |
:: Copy this "o=" from the output of the "mount" command inside your alpine container | |
:: Add "pass=" property, this will be your windows password, in this bat, this is a input | |
docker run -it --rm --platform linux ^ | |
-v shared_volume:/app ^ | |
-w /app/ ^ | |
node:11.6-alpine sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating/running you container with this external volume you can run
npm install scss
and it will work.