Skip to content

Commit b1ec7a9

Browse files
committed
Use native Bazel alpine package
1 parent d15da93 commit b1ec7a9

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Dockerfile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.6
1+
FROM alpine:latest
22

33
MAINTAINER davido
44

@@ -13,30 +13,26 @@ RUN apk add --no-cache --virtual=.build-deps \
1313
bash \
1414
curl \
1515
g++ \
16-
linux-headers \
17-
make \
1816
musl-dev \
1917
openjdk8 \
2018
sed \
21-
zip
19+
zip \
20+
libarchive \
21+
unzip
2222

2323
# Install glibc: https://github.com/bazelbuild/rules_closure/issues/228
2424
RUN apk --no-cache add ca-certificates wget \
2525
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub \
2626
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.26-r0/glibc-2.26-r0.apk \
2727
&& apk add glibc-2.26-r0.apk
2828

29-
# Install Bazel from source: https://github.com/bazelbuild/bazel/issues/4034
30-
ENV BAZEL_VERSION 0.8.0rc1
29+
# Install Bazel
30+
ENV BAZEL_VERSION 0.7.0
3131
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
3232

33-
# curl -SLO https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip \
34-
RUN curl -SLO https://releases.bazel.build/0.8.0/rc1/bazel-0.8.0rc1-dist.zip \
35-
&& mkdir bazel-${BAZEL_VERSION} \
36-
&& unzip -qd bazel-${BAZEL_VERSION} bazel-${BAZEL_VERSION}-dist.zip \
37-
&& cd bazel-${BAZEL_VERSION} \
38-
&& bash compile.sh \
39-
&& cp -p output/bazel /usr/bin/
33+
RUN wget -q -O /etc/apk/keys/[email protected] https://raw.githubusercontent.com/davido/bazel-alpine-package/master/[email protected] \
34+
&& wget https://github.com/davido/bazel-alpine-package/releases/download/0.7.0/bazel-0.7.0-r1.apk \
35+
&& apk add bazel-0.7.0-r1.apk
4036

4137
# Add links to javac and jar
4238
RUN cd /usr/bin \

0 commit comments

Comments
 (0)