Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RA80533 opened this issue May 24, 2021 · 1 comment
Open

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

RA80533 opened this issue May 24, 2021 · 1 comment

Comments

@RA80533
Copy link
Contributor

RA80533 commented May 24, 2021

  • 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.

@jacobmsft
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants