docker run -d minimum2scp/nodejs
ssh login to container:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no debian@<container IP address>
or use published port:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p <published ssh port> debian@localhost
id debian: uid=2000(debian) gid=2000(debian) groups=2000(debian),4(adm),27(sudo)UID PID PPID C STIME TTY STAT TIME CMD
root 1 0 0 03:42 ? Ss 0:00 init [2]
root 37 1 0 03:42 ? Ssl 0:00 /usr/sbin/rsyslogd
root 62 1 0 03:42 ? Ss 0:00 /usr/sbin/cron
root 88 1 0 03:42 ? Ss 0:00 /usr/sbin/sshd
root 124 88 0 03:42 ? Ss 0:00 \_ sshd: debian [priv]
debian 126 124 0 03:42 ? S 0:00 \_ sshd: debian@pts/0
debian 127 126 0 03:42 pts/0 Ss 0:00 \_ -bash
debian 178 127 0 03:42 pts/0 R+ 0:00 \_ ps -ef fww
nodenv is installed in /opt/nodenv, and enabled by /etc/profile.d/nodenv.sh.
If you need root privilege, use sudo bash -lc "...".
For example, install LTS version of nodejs:
sudo bash -lc "nodenv install 10.16.0"
Content type
Image
Digest
sha256:d20f438d5…
Size
584.7 MB
Last updated
9 days ago
docker pull minimum2scp/nodejs