github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/tests/dockertesting/debian/Dockerfile (about)

     1  FROM debian:bullseye-slim
     2  LABEL maintainer="Turbot Support <help@turbot.com>"
     3  
     4  # to run tests from the branch
     5  ARG TARGETBRANCH
     6  
     7  # add a non-root 'steampipe' user
     8  RUN adduser --system --disabled-login --ingroup 0 --gecos "steampipe user" --shell /bin/false --uid 9193 steampipe
     9  
    10  # updates and installs - 'wget' for downloading steampipe, 'less' for paging in 'steampipe query' interactive mode,
    11  # and others for running acceptance tests
    12  RUN apt-get update -y && apt-get install -y sudo wget git jq sed vim curl bc less
    13  
    14  # copy steampipe binary from local folder
    15  COPY steampipe /usr/local/bin/
    16  
    17  # Use a constant workspace directory that can be mounted to
    18  WORKDIR /workspace
    19  
    20  # change the owner of the /workspace directory
    21  RUN chown steampipe:0 /workspace
    22  
    23  # Change user to non-root
    24  USER steampipe:0
    25  
    26  # disable auto-update
    27  ENV STEAMPIPE_UPDATE_CHECK=false
    28  
    29  # disable telemetry
    30  ENV STEAMPIPE_TELEMETRY=none
    31  
    32  # enable introspection tables
    33  ENV STEAMPIPE_INTROSPECTION=info
    34  
    35  # use to run tests from the branch
    36  ENV BRANCH=$TARGETBRANCH
    37  
    38  # expose postgres service default port
    39  EXPOSE 9193
    40  
    41  # expose dashboard service default port
    42  EXPOSE 9194
    43  
    44  COPY run-tests.sh /usr/local/bin
    45  ENTRYPOINT [ "sh", "-c", "run-tests.sh $BRANCH" ]