WIP: Working individual containers and docker compose demo

This commit is contained in:
Michael Hohn
2024-09-12 09:49:25 -07:00
committed by =Michael Hohn
parent 259bac55fb
commit 34958e4cf4
9 changed files with 175 additions and 126 deletions

View File

@@ -56,7 +56,9 @@ ENV CODEQL_JAVA_HOME=/usr
# to user settings.
# This is in addition to the environment variable CODEQL_JAVA_HOME which has no
# effect on the plugin
USER root
COPY ./settings.json /home/coder/.local/share/code-server/User/
RUN chown -R coder:coder /home/coder/.local/share/code-server/
# Start Code Server
ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:9080", "."]

View File

@@ -17,6 +17,7 @@
- Setup inside the container
#+BEGIN_SRC shell
cd
export PATH=/opt/codeql:$PATH
codeql pack init qldemo
cd qldemo
@@ -26,9 +27,12 @@
- Open a new file =qldemo/simple.ql= and add this this query to it. The plugin
will download the CodeQL binaries (but never use them -- the configuration
redirects)
#+BEGIN_SRC java
#+BEGIN_SRC sh
cd
cat > qldemo/simple.ql <<eof
import python
select 42
select 42
eof
#+END_SRC
- Create database.
@@ -42,7 +46,7 @@
codeql database create --language=python -s . -v short-db
#+END_SRC
- Set the database as default and run the query.
- Set the database as default and run the query on =simple.ql=
- Capture the state of this container and create a new image from it
#+BEGIN_SRC sh
@@ -53,8 +57,6 @@
#+END_SRC
- Push this container
[[file:~/work-gh/mrva/mrvacommander/client/containers/vscode/Makefile::image-push: image]]
#+BEGIN_SRC sh
docker images |head
make csi-push
#+END_SRC

View File

@@ -1,4 +1,4 @@
{
"codeQL.runningQueries.numberOfThreads": 2,
"codeQl.cli.executablePath": "/opt/codeql"
"codeQL.cli.executablePath": "/opt/codeql/codeql"
}