docker初始化

避免僵尸进程

使用dump-init

FROM node:16 AS builder


RUN apt install dumb-init

...
...

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["node", "dist/main"]

使用tini

docker run --init .......

开启docker内部ssh

docker exec -it <containerName> bash
/etc/init.d/ssh start

你可能感兴趣的:(docker,容器,运维)