github.com/joey-fossa/fossa-cli@v0.7.34-0.20190708193710-569f1e8679f0/docker/base/Dockerfile (about)

     1  # This Dockerfile is the base image for developing the FOSSA CLI. It sets up the
     2  # non-root FOSSA user account, but contains no build tools or other extras.
     3  FROM buildpack-deps:18.04-scm
     4  
     5  # Add useful scripting + debugging utilities.
     6  RUN apt-get update && \
     7      apt-get install -y sudo tmux tree vim
     8  
     9  # Add and drop down to non-root user.
    10  RUN useradd fossa && \
    11      mkdir /home/fossa && \
    12      chown fossa /home/fossa && \
    13      echo "fossa ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/fossa && \
    14      chmod 0440 /etc/sudoers.d/fossa && \
    15      usermod -s /bin/bash fossa
    16  USER fossa
    17  WORKDIR /home/fossa
    18  
    19  # Install Go compiler and toolchain.
    20  RUN wget https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz -O /tmp/go.tar.gz && \
    21      sudo tar -xf /tmp/go.tar.gz -C /usr/local 
    22  ENV GOPATH=/home/fossa/go PATH=$PATH:/usr/local/go/bin:/home/fossa/go/bin
    23  
    24  # Install tools for developing FOSSA CLI.
    25  RUN mkdir -p $GOPATH/bin && \
    26      curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \
    27      go get -u -v github.com/go-bindata/go-bindata/... && \
    28      go get -u -v github.com/cheekybits/genny && \
    29      go get -u -v github.com/jstemmer/go-junit-report && \
    30      go get -u -v github.com/derekparker/delve/cmd/dlv