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

Dockerfile issues and possible fix #118

Open
m-carrasco opened this issue Jan 20, 2025 · 0 comments
Open

Dockerfile issues and possible fix #118

m-carrasco opened this issue Jan 20, 2025 · 0 comments

Comments

@m-carrasco
Copy link

m-carrasco commented Jan 20, 2025

Hi,

I'm sharing my quick fix to solve building errors in the Dockerfile. This may not necessarily be the right way to do it, so I opened this as an issue.

The latest Debian version has a newer Python version that no longer ships certain required header files. That is why I fixed it to an older version. I also upgraded Node and installed some missing npm dependencies. Also, cloning via HTTP seems more friendly than SSH for Docker images, I had issues with it.

I'm open to any suggestions; I don't have any experience with JavaScript.

diff --git a/Analyser/scripts/postinstall b/Analyser/scripts/postinstall
index 7c03656..c9068bc 100755
--- a/Analyser/scripts/postinstall
+++ b/Analyser/scripts/postinstall
@@ -1,4 +1,4 @@
 #!/usr/bin/env bash
 (cd node_modules/jalangi2/ && npm install)
-(git clone git@github.com:ExpoSEJS/z3javascript.git node_modules/z3javascript && cd node_modules/z3javascript && npm install)
+(git clone https://github.com/ExpoSEJS/z3javascript.git node_modules/z3javascript && cd node_modules/z3javascript && npm install)
 
diff --git a/Dockerfile b/Dockerfile
index 34540e1..e15f0f9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:latest
+FROM debian:bullseye
 
 #Install SSH, Xvfb etc
 RUN apt update && apt install --assume-yes git bash openssh-server clang build-essential vim curl xvfb python3 python3-pip libgtk-3-0 tmux libxss1 libgconf-2-4 libnss3 libasound2
@@ -27,5 +27,11 @@ RUN mkdir -p /work
 RUN chown -R expose /work
 VOLUME ["/work"]
 
+SHELL ["/bin/bash", "-c"]
+
+RUN echo "source /home/expose/.nvm/nvm.sh" >> ~/.bashrc && \
+    echo "export PATH=$PATH:/home/expose/.nvm/versions/node/v21.7.3/bin/" >> ~/.bashrc
+
 EXPOSE 22
-CMD ["/source/expoSE"]
+
+CMD ["/bin/bash", "-c", "source ~/.bashrc && /source/expoSE"]
diff --git a/scripts/docker_setup b/scripts/docker_setup
index 9dff7b3..eda726a 100755
--- a/scripts/docker_setup
+++ b/scripts/docker_setup
@@ -6,7 +6,12 @@ git config --global user.email "blake@parsed.uk"
 #Install Node
 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
 source ~/.nvm/nvm.sh
-nvm install 8.12.0
+nvm install 21
 source ~/.nvm/nvm.sh
 
 npm --unsafe-perm install
+npm install tmp tree-kill colors walk
+pushd /source/Analyser
+npm install
+popd

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

1 participant