-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add arm32 Dockerfile #5370
Add arm32 Dockerfile #5370
Changes from all commits
18c561e
6299189
cb439ab
f07ac6c
5729581
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -317,6 +317,48 @@ Stop the running container: | |
|
||
docker stop ipfs_host | ||
|
||
### Building Docker images | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be updated for go 1.11. |
||
|
||
For other platforms such as ARM, you may need to build a docker image to run. | ||
|
||
The main Dockerfile takes the following args: | ||
- `base`: The base go image for the target platform | ||
- `busybox_base`: The busybox base image for the target platform | ||
- `tini_executable`: The tini executable path for the target platform | ||
- `glibc_shared_lib_arch`: The target platform shared lib for glibc supplementing busybox | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there really no better way to do this (i.e., with one variable). From what I can tell, there simply isn't but I'm not a Docker expert so I'd like to double check. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. This was seemingly the only way. |
||
|
||
#### `base` | ||
Possible values: | ||
- `golang:1.10-stretch` (default) | ||
- `arm32v7/golang:1.10-stretch` | ||
|
||
#### `busybox_base` | ||
Possible values: | ||
- `busybox:1-glibc` (default) | ||
- `arm32v7/golang:1.10-stretch` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. busybox. |
||
|
||
#### `tini_executable` | ||
Possible values: | ||
- `tini` (default) | ||
- `tini-armhf` | ||
|
||
#### `glibc_shared_lib_arch` | ||
Possible values: | ||
- `x86_64-linux-gnu` (default) | ||
- `arm-linux-gnueabihf` | ||
|
||
#### Example Docker image build | ||
|
||
Building for x86 linux: | ||
```sh | ||
docker build . -f Dockerfile | ||
``` | ||
|
||
Building for Raspberry Pi (arm32v7): | ||
```sh | ||
docker build . -f Dockerfile --build-arg base=arm32v7/golang:1.10-stretch --build-arg tini_executable=tini-armhf --build-arg 'busybox_base=arm32v7/busybox:1-glibc' --build-arg glibc_shared_lib_arch=arm-linux-gnueabihf | ||
``` | ||
|
||
When starting a container running ipfs for the first time with an empty data directory, it will call `ipfs init` to initialize configuration files and generate a new keypair. At this time, you can choose which profile to apply using the `IPFS_PROFILE` environment variable: | ||
|
||
docker run -d --name ipfs_host -e IPFS_PROFILE=server -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 4001:4001 -p 127.0.0.1:8080:8080 -p 127.0.0.1:5001:5001 ipfs/go-ipfs:latest | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a docker expert, but shouldn't this just go down at line 46? Is there a reason to duplicate it?