Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
apicht committed Apr 8, 2016
1 parent 4eab68d commit f7a7ebb
Show file tree
Hide file tree
Showing 3 changed files with 13,969 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
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"]
15 changes: 15 additions & 0 deletions README.md
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"]
```
Loading

0 comments on commit f7a7ebb

Please sign in to comment.