exercism / typescript-test-runner

GNU Affero General Public License v3.0
1 stars 4 forks source link

Docker permission error #8

Closed ErikSchierboom closed 3 years ago

ErikSchierboom commented 3 years ago

If I try to run the test runner in Docker using ./run-in-docker.sh leap ../typescript/exercises/practice/leap ../typescript/exercises/practice/leap (which assumes there is a sibling typescript repo checked out), I get an error. This is the same error as https://github.com/exercism/javascript-test-runner/issues/43.

The output of the above command in the javascript looks something like this:

Using reporter : /opt/test-runner/dist/reporter.js
Using test-root: /solution/
Using base-root: /opt/test-runner
Using setup-env: /opt/test-runner/dist/jest/setup.js
Using /solution/.meta/config.json as base configuration
Enabling tests in /solution/leap.spec.js
sed: couldn't open temporary file /solution/sedXo2Ajt: Permission denied
sed: couldn't open temporary file /solution/sedaMcAZw: Permission denied
sed: couldn't open temporary file /solution/sedNuro8w: Permission denied

This transformation is done in prepare.sh. If I run ls -al in prepare.sh to check the permissions, I get:

drwxr-xr-x 4 node node 4096 May 12 11:45 .
drwxr-xr-x 1 root root 4096 May 12 11:48 ..
drwxr-xr-x 2 node node 4096 May 12 11:45 .docs
-rw-r--r-- 1 node node  318 May 12 11:45 .eslintrc
drwxr-xr-x 2 node node 4096 May 12 11:45 .meta
-rw-r--r-- 1 node node   12 May 12 11:45 .npmrc
-rw-r--r-- 1 node node 1065 May 12 11:45 LICENSE
-rw-r--r-- 1 node node  252 May 12 11:45 babel.config.js
-rw-r--r-- 1 node node  248 May 12 11:45 leap.js
-rw-r--r-- 1 node node 1107 May 12 11:45 leap.spec.js
-rw-r--r-- 1 node node  816 May 12 11:45 package.json

The Dockerfile specifies that the image is run as user appuser, which then doesn't have the required permissions.

While the files are different for the typescript track, the problem is the same.

SleeplessByte commented 3 years ago

I think this was fixed?