How to access files downloaded on my windows machine from boot2docker? - windows

I have a file which is downloaded from browser. I have boot2docker on my windows machine. From boot2docker, how can i access my downloaded file? Is it possible?

If you setup shared directories with VirtualBox, it is possible, however, it is overly complex for not much.
I'd advise to simply use curl or wget within boot2docker to download your file(s).
An other solution would be to use winscp to upload your file from windows to boot2docker.

The download folder should be mounted in boot2docker already.
From Boot2Docker's README:
Alternatively, Boot2Docker includes the VirtualBox Guest Additions
built in for the express purpose of using VirtualBox folder sharing.
The first of the following share names that exists (if any) will be
automatically mounted at the location specified:
Users share at /Users
/Users share at /Users
c/Users share at /c/Users
/c/Users share at/c/Users`
c:/Users share at/c/Users`
Since Windows' default download location is C:\Users\[username]\Downloads your downloaded file should be in the Boot2Docker VM at /c/Users/[username]/Downloads.

Related

flashing nuttx RTOS to stm32F4developer from windows

I installed Ubuntu terminal as now Windows 10 supports it. I built the Nuttx RTOS using the terminal but in Ubuntu I cannot access USB devices except for a pen drive.
How can I flash the bin file to stm32f4developer?
You can use windows tools. All of the files in the Ubuntu "sandbox" can be access by Windows tools running outside of that sandbox. In the top-level NuttX README:
Accessing Ubuntu Files From Windows
In Ubuntu Userspace for Windows, the Ubuntu file system root directory is
at:
%localappdata%\lxss\rootfs
Or
C:\Users\Username\AppData\Local\lxss\rootfs
However, I am unable to see my files under the rootfs\home directory.
After some looking around, I find the home directory
%localappdata%\lxss\home.
With that trick access to the /home directory, you should actually be
able to use Windows tools outside of the Ubuntu sandbox with versions of
NuttX built within the sandbox using that path.
As user6711188 explained you can access your home at %localappdata%\lxss\home or you can copy the nuttx.bin directly to Windows side:
$ cp nuttx.bin /mnt/c/ProgramData/
You will need to configure Windows Explorer to show Hidden files, this way you could see the nuttx.bin at C:\ProgramData
More info: https://acassis.wordpress.com/2018/01/10/how-to-build-nuttx-on-windows-10/

Store Docker image files on external drive in macOS

I'm using a Mac Book Pro with 128Gb disk. Is there any way to have the Docker images be stored on an external hard drive rather than on the Mac's main drive?
I don't have that much free space, and can't afford to remove any installed software. Ideally I'd like to have Docker fetch the images from an external drive. Can this be done using a symlink?
Eventually figured out that docker can use a symlink. In a macOS setup the file that I want to place in an external drive is located at:
~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/
and is named
Docker.qcow2
Just move the file to an external disk drive (for instance) and create a symlink pointing to the new location.
Please create a symlink to your desired external drive location:
create a symlink from ~/Library/Containers/com.docker.docker to your external drive location
EHOME=/Volumes/<your-external-drive-name>
ln -s $EHOME/Library/Containers/com.docker.docker ~/Library/Containers/com.docker.docker
I was able to get this working and documented it here:
This tutorial will explain how to setup an external disk to store docker images and containers.
https://github.com/09wattry/run-docker-external-storage
It is basically a symlink to the folders mentioned.

Using a local editor with Vagrant

I typically use the atom editor for any coding work and have folders on my computer with the code. After doing some updates on my Mac OS computer, some ruby gems stopped worked, rvm no longer responded and homebrew gave me a ton of trouble. I want to prevent this from happening again and figured I'd use Vagrant instead. I like it so far and it works fine, however I want to use my Atom editor nevertheless.
Normally I work on projects using gulp or grunt and they compile the files whenever any changes are made. While I have managed to connect to Vagrant with FileZilla, I have no idea how to connect atom to it. All I need is to edit the files in the Vagrant VM, as I would if they were stored in regular directories on my Mac. Any idea how to solve this?
you can certainly use your current workflow but you do not necessarily need to connect to your vm using Filezilla or another protocol.
The best is to look at Synced Folders and synchronized your project directory. By default vagrant synchronized your current directory (where the Vagrantfile is store) to the /vagrant directory in the vm. so if you can place your project directory within the same folder, they will be automatically synchronized.
If Atom (I am not user of this editor) have a special folder where you store your project files, you can add this folder as synchronized folder. Add the following to your Vagrantfile
config.vm.synced_folder "/Users/fhenri/project/tac.local", "/project"
In my case this synchronized my host (mac os) folder /Users/fhenri/project/tac.local to the vm folder /project so whenever I make a change in this folder, I can see the exact same change from the vm.
If you use ruby and gems, it might be good to install the gem locally (within your project structure that you can share between the host and the guest) so they are automatically reflected in the 2 environments when you make a change.
When you're using gulpor grunt you would launch them from the vm, working on a synchronized folder and all the changes you will make from the mac os host would automatically be picked up on the vm. I remember when working with default Virtual box sharing folder, automatically is not flash light, you should allow a few seconds delay but still it is working.
If performance is becoming an issue, you can look at nfs synchronization type by making the change
config.vm.synced_folder "/Users/fhenri/project/tac.local", "/project", type: "nfs"
It should improve a bit

How to setup remote debugging in PyCharm on Windows with Vagrant?

I have been able to setup Vagrant on Windows 7 64-bit for a django project. The Vagrant instance is running the application with postgres as backend. I have setup port forwarding, so I am able to access through my browser on local machine. I have also setup remote interpreter in PyCharm. But, I am unable to figure out how to open the project, which is on vagrant instance, in PyCharm 3.0. I also have the source code on my local machine.
Any ideas?
Thanks
Synced Folders may be something you are looking for.
NOTE: by default Vagrant use VirtualBox's vboxsf for synced folder and share your project directory (where the Vagrantfile resides) to /vagrant within the guest.
However, vboxsf has known performance issues with large number of files and directories. You can try to move the project to /vagrant (or whatever synced folder) so that both the host (Windows 7) and guest can access the project easily. See if it works well. If you see slowness try moving to NFS or sshfs.
Reference
Vagrant shared and synced folders
What is the difference between shared folder and synced folder in Vagrant?

Is there a way to migrate svn without using svnadmin dump?

My linux box has unfortunately died. I can access the raw SVN repositories from a backup and I need to revive them on my Windows box (at least for the timebeing). Is there a way of migrating/importing these repositories, given that I can't run "svnadmin dump" on the linux box?
I'd suggest booting from a Linux live CD of the same distribution as your Linux server, or create a virtual machine with VMWare Player or VirtualBox and mount the filesystem, then you can do an svnadmin dump from there.
As it's no longer in use (no commits or checkouts), try copying the whole repo to your Windows box.

Resources