@@ -29,7 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2929// This is a nodejs server based on express that serves the v4-cokapi/ app
3030// To test locally, run 'make' and load http://localhost:3000/
3131
32- var IS_DEBUG = true ;
32+ var IS_DEBUG = false ;
3333
3434var PRODUCTION_PORT = 3000 ;
3535var DEBUG_PORT = 5001 ;
@@ -116,7 +116,7 @@ function exec_js_handler(useJSONP /* use bind first */, req, res) {
116116 if ( USE_DOCKER_SANDBOX ) {
117117 // this needs to match the docker setup in Dockerfile
118118 exeFile = '/usr/bin/docker' ; // absolute path to docker executable
119- args . push ( 'run' , '--rm' , 'pgbovine/cokapi:v1' ,
119+ args . push ( 'run' , '--rm' , '--user=netuser' , '--net=none' , '--cap-drop' , 'all' , ' pgbovine/cokapi:v1',
120120 'node' ,
121121 '--expose-debug-as=Debug' ,
122122 '/tmp/javascript/jslogger.js' ) ;
@@ -171,7 +171,7 @@ function exec_java_handler(useJSONP /* use bind first */, req, res) {
171171 if ( USE_DOCKER_SANDBOX ) {
172172 // this needs to match the docker setup in Dockerfile
173173 exeFile = '/usr/bin/docker' ; // absolute path to docker executable
174- args . push ( 'run' , '--rm' , 'pgbovine/cokapi:v1' ,
174+ args . push ( 'run' , '--rm' , '--user=netuser' , '--net=none' , '--cap-drop' , 'all' , ' pgbovine/cokapi:v1',
175175 '/tmp/run-java-backend.sh' ,
176176 inputObjJSON ) ;
177177 } else {
@@ -203,7 +203,7 @@ function executePython(pyVer, req, res) {
203203 if ( USE_DOCKER_SANDBOX ) {
204204 // this needs to match the docker setup in Dockerfile
205205 exeFile = '/usr/bin/docker' ; // absolute path to docker executable
206- args . push ( 'run' , '--rm' , 'pgbovine/cokapi:v1' ,
206+ args . push ( 'run' , '--rm' , '--user=netuser' , '--net=none' , '--cap-drop' , 'all' , ' pgbovine/cokapi:v1',
207207 ( pyVer == 'py2' ? 'python' : 'python3' ) ,
208208 '/tmp/python/generate_json_trace.py' ) ;
209209 } else {
0 commit comments