-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (29 loc) · 753 Bytes
/
Dockerfile
File metadata and controls
42 lines (29 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM golang:1 AS builder
RUN mkdir -p /tmp/gopath/
ENV GOPATH /tmp/gopath/
RUN go install github.com/bazelbuild/bazelisk@latest
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y \
git \
python \
python-pip \
python3 \
python3-pip \
curl \
build-essential \
g++ \
zip \
unzip \
openjdk-11-jdk-headless \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp/
RUN mkdir -p /usr/local/bin
COPY --from=builder /tmp/gopath/bin/bazelisk /usr/local/bin/bazelisk
RUN ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel
# This both verifies that bazel is in $PATH,
# and also caches the latest bazel release at the time of docker build.
RUN bazel version
RUN mkdir -p /opt
WORKDIR /opt/