-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
13,969 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
# Pull base image | ||
FROM resin/rpi-raspbian:wheezy | ||
MAINTAINER Aaron Picht <https://github.com/apicht/docker-rpi-golang> | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get -y upgrade && \ | ||
apt-get install -y \ | ||
ca-certificates \ | ||
git \ | ||
curl \ | ||
--no-install-recommends && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV GOROOT_BOOTSTRAP /go | ||
ENV GOLANG_VERSION 1.6 | ||
ADD ./etc/services /etc/services | ||
RUN \ | ||
curl -Ok https://storage.googleapis.com/golang/go$GOLANG_VERSION.linux-armv6l.tar.gz && \ | ||
tar -xzf go$GOLANG_VERSION.linux-armv6l.tar.gz | ||
|
||
|
||
# Set environment variables | ||
ENV GOROOT /go | ||
ENV GOPATH /gopath | ||
ENV GOARM 6 | ||
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH | ||
|
||
# Define working directory | ||
WORKDIR /gopath | ||
|
||
# Define default command | ||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# rpi-golang | ||
|
||
Docker image containing Go 1.6 binaries compatible with the Raspberry Pi. | ||
|
||
### Example: Run and attach the Docker image with a volume mount | ||
```bash | ||
docker run -ti -v /data/docker/go:/data apicht/rpi-golang | ||
``` | ||
|
||
### Example: Reference this image from another Dockerfile to run a Go-dependent application | ||
```Dockerfile | ||
FROM apicht/rpi-golang:latest | ||
RUN go get github.com/golang/example/hello | ||
CMD ["hello"] | ||
``` |
Oops, something went wrong.