Published on

docker初始化

Authors
  • avatar
    Name
    Lif
    Twitter

避免僵尸进程

使用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