Skip to content

Use --build-arg to specify versions during the build process #25

Open

Description

@RA80533
  • RUN python3 /usr/local/startup_scripts/get-latest-codeql-version.py > /tmp/codeql_version
  • RUN git clone https://github.com/github/codeql ${CODEQL_HOME}/codeql-repo && \
    git --git-dir ${CODEQL_HOME}/codeql-repo/.git log --pretty=reference -1 > /opt/codeql/codeql-repo-last-commit
  • RUN git clone https://github.com/github/codeql-go ${CODEQL_HOME}/codeql-go-repo && \
    git --git-dir ${CODEQL_HOME}/codeql-go-repo/.git log --pretty=reference -1 > /opt/codeql/codeql-go-repo-last-commit
  • RUN CODEQL_VERSION=$(cat /tmp/codeql_version) && \
    wget -q https://github.com/github/codeql-cli-binaries/releases/download/${CODEQL_VERSION}/codeql-linux64.zip -O /tmp/codeql_linux.zip && \
    unzip /tmp/codeql_linux.zip -d ${CODEQL_HOME} && \
    rm /tmp/codeql_linux.zip

These occurrences can be updated to vastly improve the idempotence of building the Docker image. Right now, running docker build produces different images based on when the command is run. It could change quite a bit over the course of a week.

Activity

  1. jacobmsft commented on Nov 21, 2021

    @jacobmsft
    Contributor

    Good point. I'll put this in the backlog, alternatively, I'll be happy to accept a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions