Skip to content

Instantly share code, notes, and snippets.

Created Apr 6, 2018
What would you like to do?
Kythe in a Docker image
FROM debian:jessie-backports as build
RUN apt-get update && apt-get install -y \
asciidoc asciidoctor source-highlight graphviz \
gcc libssl-dev uuid-dev libncurses-dev libcurl4-openssl-dev flex clang-3.5 bison \
RUN apt-get install -y -t jessie-backports openjdk-8-jdk
# install golang
RUN apt-get install -y curl
ENV SHELL /bin/bash
RUN curl -LO$(uname)/go_installer && chmod +x go_installer && ./go_installer && rm go_installer
# install docker
RUN apt-get install -y apt-transport-https
RUN curl -fsSL "" | apt-key add -qq - >/dev/null
RUN echo "deb [arch=amd64] jessie edge" > /etc/apt/sources.list.d/docker.list
RUN apt-get update -qq >/dev/null
RUN apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
# install bazel
RUN echo "deb [arch=amd64] stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN curl | apt-key add -
RUN apt-get update && apt-get install -y bazel clang git build-essential pkg-config
# install CMake 3.10 (needs to be 3.4.3 or higher)
RUN curl -LO && \
tar -xzf cmake-3.10.2-Linux-x86_64.tar.gz && \
mv cmake-3.10.2-Linux-x86_64 /usr/local/cmake && \
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
# add all code and update dependencies
RUN git clone
WORKDIR /kythe
RUN /kythe/tools/modules/
RUN bazel build //...
RUN bazel test //...
ENTRYPOINT ["/kythe/bazel-bin/kythe/go/serving/tools/kythe/linux_amd64_stripped/kythe"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment