Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
zetasql docker compilation
FROM ubuntu:latest
FROM ubuntu:latest
RUN apt-get -y update
RUN apt-get -y install wget pkg-config zip g++ zlib1g-dev unzip python3 git make bash-completion python apt-utils
RUN wget
RUN dpkg -i bazel_0.26.1-linux-x86_64.deb
RUN apt-get -y install openjdk-8-jdk-headless
RUN apt-get -y install python3-distutils
RUN apt-get install --fix-broken
ARG uid
ARG gid
ARG user
ARG group
ENV HOME=/build
## users group is already present remove before adding
RUN groupdel users && groupadd -g ${gid} ${group} && useradd -M -d $HOME -g ${gid} -u ${uid} ${user}
USER ${user}
WORKDIR /build
CMD bazel build --symlink_prefix=/ zetasql/...
#CMD /bin/bash
user=$(id -u -n)
group=$(id -g -n)
uid=$(id -u)
gid=$(id -g)
docker build -t zetasql-build --build-arg uid=$uid --build-arg gid=$gid --build-arg user=$user --build-arg group=$group docker/
## set this to 1 or 2 less than the cores...
docker run --cpus 10 --rm \
--mount type=bind,source=$(pwd),destination=/build \
-i -t \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.