dockerfiles/camlistore/Dockerfile
Marc Cornellà 7ac4881609 Use `apk --no-cache' on alpine images (#144)
This enables us to remove the following patterns that required
a `rm -rf /var/cache/apk`:

- `apk update`
- `apk add --update`
- `apk add --update-cache`

Supported since alpine 3.3.
2016-06-06 03:40:20 +00:00

31 lines
668 B
Docker

FROM alpine
MAINTAINER Jessica Frazelle <jess@docker.com>
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
RUN apk --no-cache add \
ca-certificates
RUN buildDeps=' \
go \
git \
gcc \
libc-dev \
libgcc \
' \
set -x \
&& apk --no-cache add $buildDeps \
&& mkdir -p /go/src/camlistore.googlesource.com \
&& cd /go/src/camlistore.googlesource.com \
&& git clone --depth 1 -b 0.9 https://camlistore.googlesource.com/camlistore.git \
&& cd /go/src/camlistore.googlesource.com/camlistore \
&& go run make.go \
&& cp -r ./bin/* /usr/local/bin/ \
&& apk del $buildDeps \
&& rm -rf /go \
&& echo "Build complete."
ENTRYPOINT [ "camlistored" ]