Installing Hyperledger fabric dependent binaries using Docker for Mac - docker

I downloaded Docker for Mac since it was a prerequisite for Hyperledger Fabric (also listed here).
Now, I downloaded platform specific binaries listed here.
The instructions said:
If you are using Docker for Mac, you will need
to use a location under /Users, /Volumes, /private, or /tmp. To use a
different location, please consult the Docker documentation for file
sharing.
So,I used the following directory: /Users/user_name/Documents/Hyperledger\ Fabric/
I followed the same commands as listed on the site.
However, I was not able to add the line below to the ~/.bash_profile.
export PATH=/Users/user_name/Documents/Hyperledger\ Fabric/bin:$PATH
If I added the above line and ran the bash_profile, it gave an error and after that commands like ls, open were giving error not found.
It seems that there is a problem with the file location since I
installed Docker for Mac instead of Docker toolbox.

The problem is that your directory name contains a space. One way to avoid this problem is to specify a directory name that has no spaces. This would be the ideal approach since once you introduce a space in the PATH variable it would need to be quoted where used subsequently.
Alternately, you could set the path as:
export PATH="/Users/user_name/Documents/Hyperledger Fabric/bin":$PATH
However, as noted this has drawbacks.

Related

Problem understanding how to, if at all possible, run my docker file (.tar)

I received a .tar docker file from a friend that told me that it should contain all dependences for a program that I've been struggling to get working and that all I need to do is "run" the Docker file. The Docker file is of a .tar format and is around 3.1 GB. The program this file was setup to run is call opensimrt. The GitHub link to the file is as follows:
https://github.com/mitkof6/OpenSimRT
The google drive link to the Docker file is as follows:
https://drive.google.com/file/d/1M-5RnnBKGzaoSB4MCktzsceU4tWCCr3j/view?usp=sharing
This program has many dependencies, some big ones to note is that it runs off ubuntu 18.04 and Opensim 4.1.
I'm not a computer scientist by any means, so I've been struggling to even learn to do docker basics like load and run a image. However, I desperately need this program to work. If you have any steps or advice on how to run this .tar I'd greatly appreciate it. Alternatively if you are able to find a way to get opensimrt up and running and can post those steps I'd be more than happy with that solution as well.
I've tried the commands "docker run" and "docker load" followed by their respective tags, file paths, args..etc. However, even when I fix various issues I always get stuck with a missing var/lib/docker/tmp/docker-import-....(random numbers) file. The numbers change every so often when trying to solve the issue, but eventually I always end up getting some variation of this error: Error response from daemon: open /var/lib/docker/tmp/docker-import-3640220538/bin/json: no such file or directory.
ps: I have extracted the .tar already and there is no install guide/instruction, .exe, install application. As a result I'm not sure how to get the program installed and running.

Not a valid editable requirement. It should either be a path to a local project or a VCS URL

I have been using open-EDX (LMS) - (Juniper Version) Devstack Installation for Ubuntu 18.04 (which uses Docker Containers). I recently git cloned edx-proctoring into the place where I am using Devstack such that my folder structure would be like:
openEDX/credentials (or) devstack (or) edx-platform (or) edx-proctoring ....etc......
Now, I need to Install the cloned folder into my pre-existing devstack development. I am using these instructions:
https://github.com/edx/edx-proctoring/blob/master/docs/developing.rst
I am stuck in the Sub-section: Install the proctoring package into edx-platform in the container, for both LMS and Studio
Under Section:
How do I develop on edx-proctoring?
I provided the correct path for the git-cloned folder inside private.txt file.
Now, after entering into make lms-shell, when I am trying to call paver install_prereqs
it is giving me this error:
ERROR: /folder-path/ is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).
No matter what path I give (like via root folder, via absolute path) the same error is repeating.
I am out of solutions. I would really appreciate suggestions and help.
Thank You.

Why is my WSL2 enviornment referencing Java folder outside its virtual environment?

When I start my development rails server I get this following message first. To my knowledge WSL2 is a virtual environment.
I would have expected it to now reference a Java directory that resides on my Windows host. Is this likely something I carried over in the project from when I was using WSL1? How would I safely correct this?
/home/daveomcd/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/railties-6.0.3.2/lib/rails/app_loader.rb:53:
warning: Insecure world writable dir /mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath
in PATH, mode 040777
I experienced the same problem when trying to fix the slowness of WSL2. The recommended solution was to move the files from the mounted NTFS drive to the root ext4 filesystem (using \\$wsl\<distroname>), so I did that.
I set up /etc/wsl.conf as below:
# Enable extra metadata options by default
[automount]
enabled = true
root = /mnt/
options = "metadata,umask=0033"
mountFsTab = false
[interop]
enabled = true
appendWindowsPath = true
And ran rails bundle to update dependencies.
Also make sure that your file permissions and owner settings are updated. Hope it helps.
Sorry, I'd love to make this more of a comment to see if I'm on the right track before committing to an answer. However, since there's too much info here for that, I'll make an attempt at getting you an answer here.
While it is a virtual environment, by default WSL provides several "Windows Interop" features that allow it to:
automatically mount Windows drives in /mnt/{c,d,...}
append the Windows path to the Linux path
run Windows executables inside Linux
share Windows environment variables with Linux (although this is not something that happens by default)
I can't be sure (long, long time since I've used Rails), but it looks like something in the app_loader.rb is checking permissions on Java directories in the path. It may be using some logic like "check each path entry and look for a java or java.exe there. If found, check permissions." Or something like that. That means that (2) and (3) above may be confusing it.
You can see this in action with which java.exe, which will likely return a Windows path. Or run notepad.exe, which will launch the Windows Notepad executable from within Linux/WSL (magic! 😉).
These are both very useful features, so I hate to disable them completely, but it's the easiest way to figure out if that's the problem. Create a /etc/wsl.conf with the following contents:
[interop]
enabled=false
appendWindowsPath=false
Exit your WSL instance and then:
(from PowerShell, CMD, or Windows Start) Run wsl --list --verbose to see the name of your distribution (most likely Ubuntu)
Likewise, run wsl --terminate <distro> to terminate that distribution.
Restart your WSL instance
Try running /mnt/c/Windows/system32/notepad.exe (assuming a normal C:\Windows installation) (should fail, since interop is disabled)
Try which notepad.exe (should fail, since the Windows path should no longer be appended to the Linux path)
Try to start your Rails dev server again - Might work (might not, I could easily be wrong about the root-cause here)
If it does work, then you can try to correct the situation with several less invasive methods than disabling those features entirely:
If you plan on only using WSL for your development, then you could remove the Windows JDK.
Or at least remove the Windows JDK from the PATH in Windows.
Or, if you want to keep it installed and in the Windows path, you could have a shell startup file (e.g. .bashrc) that removes it from the path only in WSL. I'll point you to this question which contains multiple techniques for doing so.
Or you could keep the appendWindowsPath=false in your /etc/wsl.conf but then add back in the paths you want manually in your startup config.

Cryptogen tool not found. Hyperledger fabric installation in Windows 10

I followed the Hyperledger fabric documentation to install and configure it in Windows 10. However when I run the command - "./byfn.sh -m generate" for first-network sample application, I get the following error,
I have gone thru all StackOverflow questions regarding this and made sure following steps are done,
Have set the $PATH variable correctly to include bin folder.
Have downloaded the platform-specific binary and my bin folder looks like this,
I have doubts about following steps,
I have installed Docker for Windows and was able to verify the docker installation by running hello-world image in Docker. However, I have not shared any of my local drives in Docker. Not sure whether this is the cause of this error.
Please note that this is my first question in StackOverflow. Forgive me for any mistakes/redundancies. Any help is greatly appreciated.
I'd suggest making sure that you run the script to download / install the binaries and images from within the fabric-samples directory.
The $Path is exported every time you run the byfn.sh script, confirm that the path configuration in the byfn.sh is correct and points to your correct bin location
# prepending $PWD/../bin to PATH to ensure we are picking up the correct binaries
# this may be commented out to resolve installed version of tools if desired
export PATH=${PWD}/../../bin:${PWD}:$PATH
export FABRIC_CFG_PATH=${PWD}

Error: ./ts3server: not found

I'm trying to make an Teamspeak image running on Alpine linux but am honest not sure why docker says
./ts3server: not found
This is the Github page with the Dockerfile code:
https://github.com/signofkoen/docker-teamspeak/blob/snapshot/Dockerfile
Container log:
/opt/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh: line 8: ./ts3server: not found
Anyone know's what am doing wrong? I think a did something wrong with the extracting part but am not sure.
The ts3server binary in your image looks like it was built against glibc, but it is unable to find the appropriate runtime loader on the filesystem.
You can see this by running ldd /opt/teamspeak/ts3server, which reports:
Error loading shared library ld-linux-x86-64.so.2:
No such file or directory (needed by ts3server)
This is the direct cause of your error.
I see that you're starting with the skardoska/alpine-glibc image, which sounds like maybe it was designed to provide a standard glibc environment to Alpine linux, but the image does not appear to have been constructed in a way that is compatible with your binaries. Looking at the description at https://hub.docker.com/r/skardoska/alpine-glibc/, it appears this may be a known problem, because the description says, "Waiting for https://github.com/andyshinn/alpine-pkg-glibc/issues/1".
You may be better off just starting with a glibc based distribution like Fedora or Ubuntu.

Resources