-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind-mount problem when building on Windows 10 #269
Comments
I wonder if the tar.gz hasn't downloaded properly. My copy of If that's not it, it could be related to something on your machine, so some details of how you're running Docker would be useful. |
Tar.gz downloaded ok, checked that . |
Tried setting $MQ_ARCHIVE_DEV to the downloaded mqadv_dev911_ubuntu_x86-64.tar.gz also but same error happens.
gzip: stdin: not in gzip format |
If you're using WSL, you need to look at this guide by Microsoft to get bind-mounts working. There's also a link to this in our doc. |
@arthurbarr I tried that way first. But since that produced the same result i went for the method posted in here:https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly |
Wiped my WSL installation, built it from scratch according to instructions provided in the docs |
Can you use a bind-mounted volume with Docker? For example:
That should print "Hello world" if bind-mounting volumes is working OK. The build bind-mounts the tar file into a Docker container, then hosts that tar.gz on an HTTP server, on a local network. The main build container runs (as part of |
I think i have an issue with the bind-mounting. |
I think that might happen if Docker can't find the file on the host. The volume in the bind-mount needs to be a fully qualified path. |
@arthurbarr Can you expand on that, "The volume in the bind-mount needs to be fully qualified path" ? |
I mean that the host side of the bind mount directory (before the ":") needs to be a fully qualified path (not a relative path). It would help if you could supply the full command you are using. Based on your example file name there, you might try running this:
|
Well, got an update for my Windows 10 (updated to 1809 build) and had to reinstall WSL completely. pk1972@SEPC4234:~/mq-container/downloads$ docker run --rm -it --volume /mnt/c/test/host.file:/var/container.file ubuntu:16.04 cat /var/container.file Maybe i should just do VMWare Linux and use docker from there instead ? |
I'm afraid that I don't know enough about WSL to be able to help you get that going. However, for all the apparent complexity of the mq-container build, it all boils down to a couple of regular Firstly, start an HTTP server to host the tar.gz file. Here is a way of doing this with Python, which serves up the contents of the current directory on port 8000:
Next, build the MQ Go SDK image, which is used to build the Go programs with the MQ client:
Next, get your TCP/IP address for the host you're running that HTTP server on (i.e. your Windows machine), then plug it into this command (or just set
|
As a beginner in Docker i fear i'm missing some vital points here.
Followed instructions in 'Building.md' for making a dev-server.
Got the infamous 'gzip:stdin:not in gzip format ' error as well.
Found the post describing chmod detail, added world permissions to archive but still getting this:
'+ false
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 153 100 153 0 0 25563 0 --:--:-- --:--:-- --:--:-- 30600
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The command '/bin/sh -c chmod u+x /usr/local/bin/install-mq.sh && sleep 1 && install-mq.sh && rm -rf /var/mqm && /opt/mqm/bin/crtmqdir -f -s' returned a non-zero code: 2
2019/01/30 07:25:03 copy from pipe to stdout failed: write /dev/stdout: The specified network name is no longer available.
build-server
build
docker build --build-arg BASE_IMAGE=mq-sdk:9.1.1.0-x86_64-ubuntu-16.04 -t mq-golang-sdk:9.1.1.0-x86_64-ubuntu-16.04 -f incubating/mq-golang-sdk/Dockerfile .
Sending build context to Docker daemon 10.9MB
Step 1/7 : ARG BASE_IMAGE=mq-sdk:9.1.1.0-x86_64-ubuntu-16.04
Step 2/7 : FROM $BASE_IMAGE
pull access denied for mq-sdk, repository does not exist or may require 'docker login'
Makefile-UBUNTU:267: recipe for target 'build-golang-sdk-ex' failed
make[1]: *** [build-golang-sdk-ex] Error 1
make[1]: Leaving directory '/root/mq-container'
Makefile:73: recipe for target 'build-devserver-ubuntu' failed
make: *** [build-devserver-ubuntu] Error 2'
Propably missing something obvious, but i'm blind to what obviously.
The text was updated successfully, but these errors were encountered: