Comments (7)
You have to mount an image file, not a directory. For instance:
docker run -it -v ~/project/2019-09-26-raspbian-buster-lite.img:/sdcard/filesystem.img lukechilds/dockerpi:vm
from dockerpi.
@koenvervloesem Tnanks for your reply, i still have three question:
- I notice in
README.md
You can persist filesystem changes between reboots by mounting the /sdcard volume on your host: docker run -it -v $HOME/.dockerpi:/sdcard lukechilds/dockerpi
- how can i pack my file in img file?
- And why i can`t connect the internet.
from dockerpi.
- and 2. You have to create your own bootable image file, e.g. with pi-gen to create your own custom Raspbian derivative. I can confirm that the result boots with dockerpi.
- Your virtualized system has a virtual network that isn't connected to your real network by default. Have a look at Docker and qemu networking if you want to have an internet connection in your virtualized system. I haven't done this myself yet because I don't need it for my use case.
from dockerpi.
Thanks for helping out here @koenvervloesem!
Btw, re:
- And why i can`t connect the internet.
You should be able to connect to the internet. Docker/QEMU networking should be working OOB.
Example:
Raspbian GNU/Linux 10 raspberrypi ttyAMA0
raspberrypi login: pi
Password:
Linux raspberrypi 4.19.50+ #1 Tue Nov 26 01:49:16 CET 2019 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
pi@raspberrypi:~$ sudo apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [25.1 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [278 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Fetched 13.3 MB in 50s (269 kB/s)
Reading package lists... Done
pi@raspberrypi:~$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libcurl4
The following packages will be upgraded:
curl libcurl4
2 upgraded, 0 newly installed, 0 to remove and 77 not upgraded.
Need to get 548 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirror1.ku.ac.th/raspbian/raspbian buster/main armhf curl armhf 7.64.0-4+deb10u1 [254 kB]
Get:2 http://mirror1.ku.ac.th/raspbian/raspbian buster/main armhf libcurl4 armhf 7.64.0-4+deb10u1 [294 kB]
Fetched 548 kB in 11s (51.5 kB/s)
Reading changelogs... Done
(Reading database ... 39798 files and directories currently installed.)
Preparing to unpack .../curl_7.64.0-4+deb10u1_armhf.deb ...
Unpacking curl (7.64.0-4+deb10u1) over (7.64.0-4) ...
Preparing to unpack .../libcurl4_7.64.0-4+deb10u1_armhf.deb ...
Unpacking libcurl4:armhf (7.64.0-4+deb10u1) over (7.64.0-4) ...
Setting up libcurl4:armhf (7.64.0-4+deb10u1) ...
Setting up curl (7.64.0-4+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi@raspberrypi:~$ curl example.com
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
background-color: #f0f0f2;
margin: 0;
padding: 0;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
div {
width: 600px;
margin: 5em auto;
padding: 2em;
background-color: #fdfdff;
border-radius: 0.5em;
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
}
a:link, a:visited {
color: #38488f;
text-decoration: none;
}
@media (max-width: 700px) {
div {
margin: 0 auto;
width: auto;
}
}
</style>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>
from dockerpi.
@lukechilds I have connect to the internet successful, and i also build a armv7 version, i notice this repo is only armv6 version.
from dockerpi.
There is currently a PR open for Pi 2/3 hardware: #4
from dockerpi.
As a sidenote: If you do not have internet access (on the pi container), you can fix it by editing the /etc/resolv.conf file in the pi container to reflect the same as the host (tested on Ubuntu WSL)
from dockerpi.
Related Issues (20)
- How to use 64bit kernel? HOT 1
- Pi2 and Pi3 Dockerhub? HOT 1
- Append New Port Forwarding HOT 3
- Yocto/Poky support - non-standard kernel file
- Not Booting after `apt-get upgrade`
- Slow Internet speed HOT 1
- No modules HOT 1
- mapping the /dev/snd to pass through sound
- building image on aarch64 HOT 1
- Ubuntu 20.04 LTS doesent load on vm. HOT 2
- Starting the container as pi user
- Mechanism to assign user/password on first boot? HOT 4
- odd behavior exposing ssh login port? HOT 2
- Basic VNC Server
- Unable to build Dockerfile in GitHub Codespaces
- Can't regenerate SSH keys (/dev/hwrng does not exist) HOT 1
- Improve Qemu parameters (nice thing to have)
- Package python is not available, but is referred to by another package
- Disk performance `pi1` vs `pi2`/`pi3`
- usbnet: failed control transaction: request 0x2143 value 0xe index 0x0 length 0x HOT 5
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 dockerpi.