koalazak/rest980

Synology Docker Install Question

Closed this issue · 11 comments

I have the lid and password setup (I believe)

When I launch the container I get this message. I think it may have something to do with my mount volume?

screen shot 2018-10-10 at 9 11 53 pm

For context here is the Environment in Synology and the readout from Dorita.

I left part of my pwd exposed intentionally on the Dorita Screen shot because I want to confirm that the password begins with '1:'
screen shot 2018-10-11 at 7 38 48 am

img_1990

Hi, seems like your value "null" for SSL_KEY_FILE variable is causing problems. Just delete that env variable.
And yes, the password begins with :1:
I hope this helps you,

Same result. The log file keeps referencing that I don't have the correct version of node.js installed.

In the past when I installed any docker container on Synology, the name of the volume became really important. What is the name of the volume?

the error that I see in your output is "not such file or directory: open "null".
referencing line 31 in bin/www file which contains fs.readFileSync(sslKeyFile)
So the error is clear: the program is trying to open a file that does not exist.

If you remove the null value, now you are having other error. please share your new output.

Check if you have other null values in env variables...
I dont know what you mean with volume name.

Gotcha... I thought 'null' meant "null" and not leave the field empty.

Regardless. I start the container and it no longer Stops with errors. Instead this is my log with no other information other to say I cannot access the server through http://[localip]:3000

img_7f48220914ff-1

As to your second question regarding volume. Synology asks that you set a volume and a mount point when installing a container.

You can leave this blank, but all my containers have a mount path. My presumption (although I've never received a clear explanation of this) is that you must have a mount point so the container can store files someplace.
img_1992

So even when I run this docker container from ssh, I receive the same log. with the NODE_ENV value of 'production' log.

More interesting, no files are on my Synology drive in the docker folder.

It's as if I download the container, launch the container but I am unable to see the container.

Any ideas? I can't believe I can't make this work?

So new log.

I created a mount on Synology to /usr/src/app

THis is the error message now

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@3.10.10
3 info using node@v6.14.3
4 verbose stack Error: ENOENT: no such file or directory, open '/usr/src/app/package.json'
4 verbose stack at Error (native)
5 verbose cwd /usr/src/app
6 error Linux 4.4.59+
7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
8 error node v6.14.3
9 error npm v3.10.10
10 error path /usr/src/app/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/usr/src/app/package.json'
15 error enoent ENOENT: no such file or directory, open '/usr/src/app/package.json'
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -2, true ]

seems like you are running npm start in a empty dir. I suggest you go to req help at Synology forum

So new log.

I created a mount on Synology to /usr/src/app

THis is the error message now

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@3.10.10 3 info using node@v6.14.3 4 verbose stack Error: ENOENT: no such file or directory, open '/usr/src/app/package.json' 4 verbose stack at Error (native) 5 verbose cwd /usr/src/app 6 error Linux 4.4.59+ 7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 8 error node v6.14.3 9 error npm v3.10.10 10 error path /usr/src/app/package.json 11 error code ENOENT 12 error errno -2 13 error syscall open 14 error enoent ENOENT: no such file or directory, open '/usr/src/app/package.json' 15 error enoent ENOENT: no such file or directory, open '/usr/src/app/package.json' 15 error enoent This is most likely not a problem with npm itself 15 error enoent and is related to npm not being able to find a file. 16 verbose exit [ -2, true ]

Sorry, do you ever solved this? I get too the error of te production env... Do you have to install node or other things first?