Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 81b2074

Browse files
committed
Add main docker image
1 parent cdd4791 commit 81b2074

File tree

12 files changed

+1005
-0
lines changed

12 files changed

+1005
-0
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build and publish docker images to registry
2+
3+
on:
4+
push:
5+
branches:
6+
master
7+
8+
jobs:
9+
publish-image:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v1
14+
15+
- name: Build and Publish Query Checking Docker Image
16+
run: ./check-queries/publish.sh
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

check-queries/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM ubuntu:19.04
2+
3+
RUN apt-get update
4+
RUN apt-get install -y wget unzip
5+
6+
RUN useradd codeql
7+
RUN mkdir ~codeql
8+
RUN chown codeql:codeql ~codeql
9+
10+
# Install CodeQL
11+
USER codeql
12+
WORKDIR /home/codeql
13+
RUN mkdir ~/codeql-home
14+
RUN wget --quiet https://github.com/github/codeql-cli-binaries/releases/download/v2.0.0/codeql.zip -O codeql-2.0.0.zip && unzip ~/codeql-2.0.0.zip -d /home/codeql/codeql-home/ && rm -f ~/codeql-2.0.0.zip && mv ~/codeql-home/codeql ~/codeql-home/codeql-cli
15+
16+
ENV PATH="/home/codeql/codeql-home/codeql-cli/:${PATH}"
17+
18+
# Install NodeJS and NPM (for action code)
19+
USER root
20+
RUN apt-get install -y git curl
21+
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
22+
RUN apt-get install -y nodejs
23+
USER codeql
24+
25+
# Add CodeQL repo
26+
RUN git clone https://github.com/Semmle/ql.git ~/codeql-home/codeql-repo
27+
28+
WORKDIR /home/codeql/codeql-home/codeql-repo/
29+
RUN git checkout ed97be459fed23c9f07a0e1895176bad7ba6c686
30+
31+
# Add and build code action code
32+
COPY --chown=codeql:codeql package /home/codeql/package
33+
WORKDIR /home/codeql/package
34+
RUN npm install
35+
RUN npm run build
36+
37+
ENTRYPOINT ["nodejs", "/home/codeql/package/build"]

check-queries/package/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
build/

0 commit comments

Comments
 (0)