blob: f2da1d59b2963ac963fbeda1836ac467d3fdf149 [file] [log] [blame]
# This is the sandbox backend server.
# When it's run, the host maps in /var/run/docker.sock to this
# environment so the play-sandbox server can connect to the host's
# docker daemon, which has the gvisor "runsc" runtime available.
FROM golang:1.14 AS build
COPY . /go/src/playground
WORKDIR /go/src/playground/sandbox
RUN go install
FROM debian:buster
RUN apt-get update
# Extra stuff for occasional debugging:
RUN apt-get install --yes strace lsof emacs-nox net-tools tcpdump procps
# Install Docker CLI:
RUN apt-get install --yes \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
RUN bash -c "curl -fsSL | apt-key add -"
RUN add-apt-repository "deb [arch=amd64] buster stable"
RUN apt-get update
RUN apt-get install --yes docker-ce-cli
COPY --from=build /go/bin/sandbox /usr/local/bin/play-sandbox
ENTRYPOINT ["/usr/local/bin/play-sandbox"]