Total Pageviews

Monday, 12 October 2026

辛亥革命推翻了帝制,为什么没守住共和?


1911年10月12日,美国丹佛。

孙文舟车劳顿,直到上午十一时才起身用餐。经过走廊时,他买了一份报纸,展开后看到一则电讯:武昌已为革命党占领。两天前,也就是10月10日,湖北新军中的革命党人发动起义。

孙文原本打算横渡太平洋回国,亲自参加战事,最后却决定转赴美国东部,再前往欧洲,争取列强的外交支持。他在自己的年谱中留下了一段解释,认为革命事业当前最需要着力的地方,“不在疆场之上,而在樽俎之间”。此刻的孙文虽然声望很高,实际掌握的军事力量却十分有限。武昌城头的枪声响起时,他不在中国,也非他所领导。

这场推翻两千年帝制的革命,究竟是谁完成的?

孙文当然是辛亥革命最重要的政治象征之一,他多年的革命活动、海外筹款和共和理念,构成了推翻清王朝的重要力量。但武昌起义不是孙文亲自发动的,辛亥革命也不是某一个人单独完成的。四川的保路运动、湖北新军中的革命网络、各省的相继独立、黄兴等人的军事活动、袁世凯掌握的北洋军,以及最后的南北议和,共同推动了帝制的终结。

十四年前的1897年,戊戌变法失败,康有为、梁启超流亡海外,光绪皇帝被幽禁。到1911年,清廷已经无法控制全国局势;再过几个月,延续了两千余年的君主制度便退出了中国政治舞台。

然而,辛亥革命的历史留下了一个比皇帝退位更难回答的问题:为什么一个曾经以推翻专制、建立共和为目标的革命,最后没有建立起稳定的宪政秩序?为什么孙文在革命失败后,逐渐接受领袖集权的政党组织方式,又在俄国十月革命之后引进苏联的政治组织技术?为什么五四一代知识分子对俄国革命的思想兴趣,最终与中国政治组织的苏化发生了汇合?而这次汇合,又为什么对此后的中国政治产生了如此持久的影响?

把这些问题放回历史现场,我们会看到一条远比英雄叙事复杂的线索:辛亥革命推翻了皇帝,却没有解决权力如何受到约束的问题。此后中国政治的许多重大变化,都与这个未完成的任务有关。

一

武昌起义并非革命党预先安排好的一场全国总攻。

清政府推行铁路国有化政策,将地方筹资修建的川汉、粤汉铁路收归国有,并向外国银行团借款,引发了四川保路运动。四川的地方士绅、铁路股东和民众的利益受到冲击,反对声浪很快从铁路权益扩展到对清廷统治的不满。1911年9月,成都发生流血事件,四川局势恶化,清政府从湖北调兵入川。武汉的兵力受到牵制,为起义创造了条件。

湖北新军中的革命组织已经秘密活动多年。10月10日,武昌起义爆发,起义者迅速控制军械库、占领重要机关,清廷在湖北的统治顷刻崩溃。此后,各省陆续宣布独立,革命从一场局部军事起事变成全国性的政权危机。保路运动提供了局势转变的契机,新军中的革命力量抓住了这个机会,清政府长期积累的政治危机终于爆发。

黄兴随后赶赴武汉,参与指挥革命军作战,在汉阳保卫战等军事行动中承担重要责任。他与孙文长期并肩从事革命,以孙黄著称。孙文拥有革命理念、海外声望和筹款联络的经验,黄兴则多次参与武装起义,是革命军实际军事行动中的重要人物。辛亥革命的成功,是许多力量汇合的结果;革命党内部也不是铁板一块。

孙文从丹佛转赴美东,再前往欧洲,主要希望阻止列强继续为清政府提供支持,争取革命政权获得国际承认与财政援助。他对局势的判断相当现实:如果外国银行继续向清廷贷款,革命军就可能面对更难处理的军事局面;如果新生政权得不到外部承认,国内局势也会更加不稳。

然而,列强首先考虑的是自己的利益。铁路投资、矿业权益、外债偿付和在华商业秩序,都比革命党人所宣扬的共和理念更直接地影响各国政府的决策。孙文在欧美奔走,并没有为革命争取到预期的财政支持。列强更愿意相信握有军队、能够维持既有秩序的袁世凯。

袁世凯也不是清帝国的忠实救星。他掌握北洋军,既能借助军事实力影响清廷,也能利用南方革命力量急于建立共和的心理,为自己争取权力。清廷需要他镇压革命,南方革命党人需要他推动清帝退位,他则希望在新政权中占据最高位置。

南北议和就在这样的局面中展开。1912年1月1日,孙文在南京就任临时大总统;2月12日,清帝溥仪退位,袁世凯随后就任临时大总统,临时政府北迁。孙文让出了职位,换取共和得以建立的政治安排。

清帝退位诏书中有一句话,后来成为理解这次权力交接的重要依据:“仍合满、汉、蒙、回、藏五族完全领土为一大中华民国。”

清帝国是一个多民族帝国,推翻清朝之后,新国家必须回答疆域如何继承、边疆如何归属的问题。同盟会革命党早期“驱除鞑虏,恢复中华”的口号带有鲜明的排满色彩,革命的民族主义目标与如何承接清帝国完整疆域之间,存在需要重新处理的张力。“五族共和”成为新政权的一种政治表述,退位诏书则为清朝统治权向共和政权的转移提供了法统依据。


清帝退位的确为共和开启了大门,但它留下了一个没有解决的问题:新政权究竟靠什么维持?

清朝的皇帝失去了统治资格,北洋军却仍由袁世凯掌握。南方革命党人获得了共和名义,却缺乏能够约束北方军事力量的办法。孙文辞去临时大总统,袁世凯接受共和政权,制度的交接看似完成,真正掌握强制力量的人却没有因此受到制度的有效制约。

辛亥革命终结了皇帝制度。共和成立之后,谁来约束掌权者,才是更难的考题。


二

1912年的中华民国有自己的宪法性文件、国会和政党竞争。革命者期待,权力此后将通过选举、议会和法律来分配。宋教仁积极推动责任内阁制,希望使政党竞争成为共和政治的正常方式。国民党在国会选举中取得优势,他相信,政党可以通过议会取得执政地位,内阁则应当对议会负责。

1913年,宋教仁遇刺身亡。案件发生后,孙文与袁世凯之间的冲突迅速升级。袁世凯削弱南方国民党力量,推动善后大借款,南方革命党人则认为议会与法律已无法阻止袁世凯扩张权力。孙文主张发动二次革命,黄兴不同意,被孙文激烈批评以后接受革命,试图以武力讨袁,结果在数月内失败,革命党人败走日本。

二次革命失败之后,孙在日本检讨原因,他认为:失败的原因"全在不听我之号令"。后来他在1914年组建中华革命党,明确规定党员入党时须向他个人宣誓效忠,按入党先后分为"首义党员"、"协助党员"、"普通党员"三个等级,不同等级在未来的政治分配中享有不同的权利,革命越早,权利越大,服从越彻底,地位越高。这已经不是政党,是一种个人效忠的金字塔。黄兴、李烈钧拒绝了这份宣誓,拒绝的理由是:一个政党的成员,应该对主义效忠,而不是对某个人效忠。他们没有加入中华革命党。后来黄兴去了美国,这些信息足以说明孙文当时对个人权威和组织纪律的认识已经发生明显变化。

孙文认为,松散的议会政党不足以与军阀抗衡,革命必须拥有统一指挥和绝对纪律。他希望结束反复失败的局面,这种愿望完全可以理解;但他选择的办法,是把党员对领袖的服从置于组织原则的核心位置。

黄兴拒绝加入中华革命党,也正是因为他不能接受这种要求。两人的分歧不是革命意志是否坚定,而是革命组织究竟应当靠什么维系。孙文希望把命令统一到领袖手中,黄兴则拒绝接受这种服从个人的机制。一个革命政党可以有领袖,却不能因此把领袖的判断变成不容置疑的最高规则。

这种分歧此后一直存在于中国革命的政治实践中。组织涣散会使革命失败,权力过度集中却会带来另一个问题:当领袖认为自己的判断代表革命利益时,谁有权反对他?如果党员必须无条件服从领袖,那么革命者推翻旧制度之后,是否会在新组织内部重新建立另一种不受约束的权力?

1915年,袁世凯称帝,黄兴从美国赶回,护国运动兴起,帝制复辟很快失败。1916年袁世凯去世,北洋军阀分裂,中央权威继续衰弱。此后,孙文发动护法运动,试图恢复《临时约法》和国会,却屡遭军阀力量阻挠。共和仍然存在于国家名义之中,权力斗争却不断回到军队、地盘和个人关系上。

这段经历让孙文逐渐相信,国家统一需要一支能够贯彻命令的革命政党,需要一支由政党组织起来、服从政治目标的军队。他后来引进苏联的组织经验,正是在这样的现实背景中发生的。理解这一点,才能既看清孙文的历史处境,也看清他选择所带来的制度后果。

共和宪政的失败,并不能证明宪政本身行不通。它首先说明,法律若没有约束军事力量的实际机制,便很难抵挡握有军队的人。袁世凯的行为摧毁了共和制度的权威,革命党人则在失败之后越来越倾向于用组织集中来解决力量不足的问题。前者破坏了法律约束,后者选择以强化内部服从来恢复行动能力。两者不是同一回事,却共同推动了政治重心从议会与法律转向组织与权力。

在这个意义上,1914年的中华革命党是一道分水岭。它尚不是苏联式政党,却已把领袖个人权威放到了组织制度的中心。十月革命尚未发生,列宁式党制还没有进入国民党的正式改组,中国革命的政治转向却已经开始。


三

1917年俄国十月革命胜利之后,中国知识界开始出现新的思想变化。1918年,李大钊在《新青年》发表《庶民的胜利》和《布尔什维主义的胜利》,热烈讨论俄国革命,将它理解为世界历史的新潮流。在之前的五四运动爆发后,巴黎和会对山东问题的处理,更使很多人对西方列强宣扬的公理与民族自决产生怀疑。但彼时的知识分子对苏联模式只是一种观察兴趣,并没有多少投入其中。真正向整个社会认为俄国革命的经验从知识界的思想资源,变成中国政治组织可以实际采用的制度,是1923年。

孙文在护法运动受挫后,仍然需要解决军队、财政和组织问题。欧美列强没有给予他所期待的援助,苏俄则希望同中国革命力量建立联系。双方有不同的政治目标,却有现实的合作需要。孙文需要能够帮助南方政权建立军队、训练干部、改组政党的力量;苏俄则希望通过援助国民党扩大自身在中国革命中的影响。

1923年1月26日,孙文与苏俄代表越飞发表联合宣言。宣言承认,中国当时最迫切的问题是国家统一与民族独立,同时明确写道,孙文认为共产主义及苏维埃制度暂时不适合直接应用于中国,越飞对此表示同意。

这个细节揭示了孙文的实际考虑。他没有简单地宣布放弃三民主义,也不能说他当时已经完整接受了苏联的政治制度。他所接受的,是苏俄能够提供的组织经验和现实援助。对一个长期受制于军阀、缺乏稳定财政与军事力量的革命领袖而言,这是一条值得尝试的新路。

1923年,孙文派蒋介石率团访问苏联,考察军事、政治和党务。苏联代表鲍罗廷随后来到广州,参与国民党改组和军校筹建。1924年1月,国民党第一次全国代表大会召开,国民党开始实行更严密的组织制度,强化基层组织、党纪与政治工作。黄埔军校在苏联顾问协助下筹办,6月开学,党代表制度和政治部也逐步进入军队建设。

政党改组的意义,远超过更换几条组织章程。过去的革命组织主要依靠领袖的声望、地方关系和个人联络;改组之后,党开始通过基层支部、纪律、宣传、政治训练和干部体系来组织社会,军队也不再只被视为军事将领的私人力量,而要接受政党目标的约束。

这是一场组织能力的变化。它让国民党能够以更系统的方式训练军官、动员群众、组织基层,也使苏联政治经验进入中国革命的实际运作。1925年莫斯科中山大学成立后,中国青年赴苏学习进一步获得制度化渠道,政治理论、党务知识和组织训练结合起来。俄国革命不再只是书刊上的讨论对象,而开始成为培养政治干部、建立革命组织时可以借鉴的实际范本。


这里的因果关系应当作更准确的表述:孙文走向领袖集权,先于他与苏俄的正式合作;国民党组织的制度化苏化,则为苏联经验进入更广泛的政治实践提供了重要通道。

五四一代知识分子中,有人出于对西方政治秩序的失望而转向社会主义,有人相信俄国革命提供了改造社会的新方法,也有人把列宁式组织视为摆脱军阀割据、实现国家统一的有效工具。1924年以后,国民党改组、黄埔军校、宣传与政治训练机构,以及后来赴苏学习的渠道,使这些思想越来越多地进入政治实践。它们不再只是个人的阅读与信仰,也开始影响政治人才如何成长、革命组织如何运转。

政治场域的转变,由此获得了持久影响。


四

宋教仁、黄兴、陈炯明,他们分别试过用选票驯服枪,用契约约束权,用地方自治抵挡集权的黑潮。他们不是没方案,不是没勇气,不是没牺牲。他们曾替中国争取到近现代史上距离现代政治文明最近的一瞬。1913年,宋教仁倒在上海火车站的枪弹之下;1916年,黄兴抱憾病逝,未能看到共和制度真正站稳;陈炯明倡导的联省自治,则在与孙文的军事冲突后逐渐退出政治舞台。他们的道路并不相同,政治主张也各有局限,却都曾试图证明,可以另有一种政治秩序。

随着宋教仁的鲜血流尽、黄兴黯然离世、陈炯明的自治理想败退,那扇刚刚透进一丝宪政天光的门,终于渐渐关闭。此后的中国,便在一路狂奔中跌入更深的历史动荡。枪炮代替了契约,领袖代替了制度,效忠代替了选票。人们在欢呼一个又一个强人的降临,期待他们结束混乱、拯救国家,却一次次将自己的命运交到不受约束的权力手中。这条从W权滑向及泉的不归路,碾过几代人的骨血与尊严,也使中国始终未能真正走出那三个人曾试图破解的政治困局。

这片土地最终辜负了他们。他们没有输给某一个具体的政敌,他们更是败给了两千年专制传统留下的沉重惯性,败给了一个始终难以解决的难题:人们渴望一个强有力的政府,却没有建立起足以约束政府的制度;

这不仅是三个理想主义者的悲哀,也是辛亥革命留给后世的遗憾。1912年,退位诏书送走了皇帝,却没有让不受约束的权力一同退场。此后百余年,政权更迭,旗帜变换,国家的面貌几经改变,那个关于权力边界的问题却始终没有离开中国历史。

这才是一百一十五年后,重读辛亥革命时,最令人心痛的地方。

Sunday, 11 October 2026

instinct帮我在render.com平台上构建基于nextjs的静态博客程序ccw


我用email id: luckypoem@gmail.com登录cloudflare.com后,导入仓库https://github.com/brightmann/ccw

下面的插图就是我跟它的对话过程.共3 张截图。


 

 

得到的博客地址是:

https://ccw-09yp.onrender.com/

 https://ccw-09yp.onrender.com/blog  支持分页。

 https://ccw-09yp.onrender.com/blog/fh 能显示视频。

项目地址:

https://github.com/cakegaly/cakegaly-web
https://github.com/brightmann/ccw,  For Next.js, Node.js version ">=20.9.0" is required.
在此处https://github.com/brightmann/ccw/tree/main/src/content/blog,新建源帖fh.mdx ,

内容为:

---
title: 战马
date: 2026-07-13 10:49
description: 这是一篇文章
icon: nextjs
tags:
  - misc1
  - misc2
  - misc3
--- 

此处写正文或html codes

(详见 https://github.com/brightmann/ccw/blob/main/src/content/blog/fh.mdx?plain=1)

 

中國AI眼鏡黑馬“Lusby”在歐美賣瘋了

 

用muse的web版帮我在cloudflare.com平台上构建基于vite的静态博客程序chmb


我用email id: luckypoem@gmail.com登录cloudflare.com后,导入仓库https://github.com/brightmann/chmb

下面的插图就是我跟它的对话过程.共 5张截图。


 



得到的博客地址是https://chmb.luckypoem.workers.dev/  支持分页

 项目地址:

 https://github.com/cakegaly/honox-minimal-blog

https://github.com/brightmann/chmb

访问https://github.com/brightmann/chmb/tree/main/app/content/blog,在这里添加源帖

fh.mdx ,内容为:

---
title: 战马
description: 这是一篇文章
date: 2026-06-17 
thumbnail: '/static/undraw/image-01.png'
tags:
  - misc1
  - misc2
  - misc3
---

此处写正文或html codes

(详见 https://github.com/brightmann/chmb/blob/main/app/content/blog/fh.mdx?plain=1) 

 

dumb-init

 A minimal init system for Linux containers。

 https://engineeringblog.yelp.com/2016/01/dumb-init-an-init-for-docker.html

PyPI version

dumb-init is a simple process supervisor and init system designed to run as PID 1 inside minimal container environments (such as Docker). It is deployed as a small, statically-linked binary written in C.

Lightweight containers have popularized the idea of running a single process or service without normal init systems like systemd or sysvinit. However, omitting an init system often leads to incorrect handling of processes and signals, and can result in problems such as containers which can't be gracefully stopped, or leaking containers which should have been destroyed.

dumb-init enables you to simply prefix your command with dumb-init. It acts as PID 1 and immediately spawns your command as a child process, taking care to properly handle and forward signals as they are received.

Why you need an init system

Normally, when you launch a Docker container, the process you're executing becomes PID 1, giving it the quirks and responsibilities that come with being the init system for the container.

There are two common issues this presents:

  1. In most cases, signals won't be handled properly.

    The Linux kernel applies special signal handling to processes which run as PID 1.

    When processes are sent a signal on a normal Linux system, the kernel will first check for any custom handlers the process has registered for that signal, and otherwise fall back to default behavior (for example, killing the process on SIGTERM).

    However, if the process receiving the signal is PID 1, it gets special treatment by the kernel; if it hasn't registered a handler for the signal, the kernel won't fall back to default behavior, and nothing happens. In other words, if your process doesn't explicitly handle these signals, sending it SIGTERM will have no effect at all.

    A common example is CI jobs that do docker run my-container script: sending SIGTERM to the docker run process will typically kill the docker run command, but leave the container running in the background.

  2. Orphaned zombie processes aren't properly reaped.

    A process becomes a zombie when it exits, and remains a zombie until its parent calls some variation of the wait() system call on it. It remains in the process table as a "defunct" process. Typically, a parent process will call wait() immediately and avoid long-living zombies.

    If a parent exits before its child, the child is "orphaned", and is re-parented under PID 1. The init system is thus responsible for wait()-ing on orphaned zombie processes.

    Of course, most processes won't wait() on random processes that happen to become attached to them, so containers often end with dozens of zombies rooted at PID 1.

What dumb-init does

dumb-init runs as PID 1, acting like a simple init system. It launches a single process and then proxies all received signals to a session rooted at that child process.

Since your actual process is no longer PID 1, when it receives signals from dumb-init, the default signal handlers will be applied, and your process will behave as you would expect. If your process dies, dumb-init will also die, taking care to clean up any other processes that might still remain.

Session behavior

In its default mode, dumb-init establishes a session rooted at the child, and sends signals to the entire process group. This is useful if you have a poorly-behaving child (such as a shell script) which won't normally signal its children before dying.

This can actually be useful outside of Docker containers in regular process supervisors like daemontools or supervisord for supervising shell scripts. Normally, a signal like SIGTERM received by a shell isn't forwarded to subprocesses; instead, only the shell process dies. With dumb-init, you can just write shell scripts with dumb-init in the shebang:

#!/usr/bin/dumb-init /bin/sh
my-web-server &  # launch a process in the background
my-other-server  # launch another process in the foreground

Ordinarily, a SIGTERM sent to the shell would kill the shell but leave those processes running (both the background and foreground!). With dumb-init, your subprocesses will receive the same signals your shell does.

If you'd like for signals to only be sent to the direct child, you can run with the --single-child argument, or set the environment variable DUMB_INIT_SETSID=0 when running dumb-init. In this mode, dumb-init is completely transparent; you can even string multiple together (like dumb-init dumb-init echo 'oh, hi').

Signal rewriting

dumb-init allows rewriting incoming signals before proxying them. This is useful in cases where you have a Docker supervisor (like Mesos or Kubernetes) which always sends a standard signal (e.g. SIGTERM). Some apps require a different stop signal in order to do graceful cleanup.

For example, to rewrite the signal SIGTERM (number 15) to SIGQUIT (number 3), just add --rewrite 15:3 on the command line.

To drop a signal entirely, you can rewrite it to the special number 0.

Signal rewriting special case

When running in setsid mode, it is not sufficient to forward SIGTSTP/SIGTTIN/SIGTTOU in most cases, since if the process has not added a custom signal handler for these signals, then the kernel will not apply default signal handling behavior (which would be suspending the process) since it is a member of an orphaned process group. For this reason, we set default rewrites to SIGSTOP from those three signals. You can opt out of this behavior by rewriting the signals back to their original values, if desired.

One caveat with this feature: for job control signals (SIGTSTP, SIGTTIN, SIGTTOU), dumb-init will always suspend itself after receiving the signal, even if you rewrite it to something else.

Installing inside Docker containers

You have a few options for using dumb-init:

Option 1: Installing from your distro's package repositories (Debian, Ubuntu, etc.)

Many popular Linux distributions (including Debian (since stretch) and Debian derivatives such as Ubuntu (since bionic)) now contain dumb-init packages in their official repositories.

On Debian-based distributions, you can run apt install dumb-init to install dumb-init, just like you'd install any other package.

Note: Most distro-provided versions of dumb-init are not statically-linked, unlike the versions we provide (see the other options below). This is normally perfectly fine, but means that these versions of dumb-init generally won't work when copied to other Linux distros, unlike the statically-linked versions we provide.

Option 2: Installing via an internal apt server (Debian/Ubuntu)

If you have an internal apt server, uploading the .deb to your server is the recommended way to use dumb-init. In your Dockerfiles, you can simply apt install dumb-init and it will be available.

Debian packages are available from the GitHub Releases tab, or you can run make builddeb yourself.

Option 3: Installing the .deb package manually (Debian/Ubuntu)

If you don't have an internal apt server, you can use dpkg -i to install the .deb package. You can choose how you get the .deb onto your container (mounting a directory or wget-ing it are some options).

One possibility is with the following commands in your Dockerfile:

RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_amd64.deb
RUN dpkg -i dumb-init_*.deb

Option 4: Downloading the binary directly

Since dumb-init is released as a statically-linked binary, you can usually just plop it into your images. Here's an example of doing that in a Dockerfile:

RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64
RUN chmod +x /usr/local/bin/dumb-init

Option 5: Installing from PyPI

Though dumb-init is written entirely in C, we also provide a Python package which compiles and installs the binary. It can be installed from PyPI using pip. You'll want to first install a C compiler (on Debian/Ubuntu, apt-get install gcc is sufficient), then just pip install dumb-init.

As of 1.2.0, the package at PyPI is available as a pre-built wheel archive and does not need to be compiled on common Linux distributions.

Usage

Once installed inside your Docker container, simply prefix your commands with dumb-init (and make sure that you're using the recommended JSON syntax).

Within a Dockerfile, it's a good practice to use dumb-init as your container's entrypoint. An "entrypoint" is a partial command that gets prepended to your CMD instruction, making it a great fit for dumb-init:

# Runs "/usr/bin/dumb-init -- /my/script --with --args"
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# or if you use --rewrite or other cli flags
# ENTRYPOINT ["dumb-init", "--rewrite", "2:3", "--"]

CMD ["/my/script", "--with", "--args"]

If you declare an entrypoint in a base image, any images that descend from it don't need to also declare dumb-init. They can just set a CMD as usual.

For interactive one-off usage, you can just prepend it manually:

$ docker run my_container dumb-init python -c 'while True: pass'

Running this same command without dumb-init would result in being unable to stop the container without SIGKILL, but with dumb-init, you can send it more humane signals like SIGTERM.

It's important that you use the JSON syntax for CMD and ENTRYPOINT. Otherwise, Docker invokes a shell to run your command, resulting in the shell as PID 1 instead of dumb-init.

Using a shell for pre-start hooks

Often containers want to do some pre-start work which can't be done during build time. For example, you might want to template out some config files based on environment variables.

The best way to integrate that with dumb-init is like this:

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["bash", "-c", "do-some-pre-start-thing && exec my-server"]

By still using dumb-init as the entrypoint, you always have a proper init system in place.

The exec portion of the bash command is important because it replaces the bash process with your server, so that the shell only exists momentarily at start.

Building dumb-init

Building the dumb-init binary requires a working compiler and libc headers and defaults to glibc.

$ make

Building with musl

Statically compiled dumb-init is over 700KB due to glibc, but musl is now an option. On Debian/Ubuntu apt-get install musl-tools to install the source and wrappers, then just:

$ CC=musl-gcc make

When statically compiled with musl the binary size is around 20KB.

Building the Debian package

We use the standard Debian conventions for specifying build dependencies (look in debian/control). An easy way to get started is to apt-get install build-essential devscripts equivs, and then sudo mk-build-deps -i --remove to install all of the missing build dependencies automatically. You can then use make builddeb to build dumb-init Debian packages.

If you prefer an automated Debian package build using Docker, just run make builddeb-docker. This is easier, but requires you to have Docker running on your machine.

See also

from  https://github.com/Yelp/dumb-init

---------

 使我想起systemd.

用muse的web版帮我在cloudflare.com平台上构建基于nextjs的静态博客程序fb

 

我用email id: luckypoem@gmail.com登录cloudflare.com后,导入仓库https://github.com/brightmann/fb

下面的插图就是我跟它的对话过程.共 8张截图。


 





i get the blog url: 

https://fb.luckypoem.workers.dev/  支持分页

https://fb.luckypoem.workers.dev/fh can display the video.

project url: 

 https://github.com/fraineralex/blog

 https://github.com/brightmann/fb/

here  https://github.com/brightmann/fb/tree/main/content/posts ,create a source post fh.mdx ,its content is:

---
title: '战马'
description: '这是一篇文章'
date: '2026-10-10T22:58'
url: '/'
hero: '/images/posts/cover/crafting-react-hooks.webp'
tags: ['misc1', 'misc2', 'misc3']
published: true
---

此处写正文或html codes.

(详见 https://github.com/brightmann/fb/blob/main/content/posts/fh.mdx?plain=1)

 



用muse的web版帮我在cloudflare.com平台上构建基于nextjs的静态博客程序tnmb


我用email id: luckypoem@gmail.com登录cloudflare.com后,导入仓库https://github.com/brightmann/tnmb

下面的插图就是我跟它的对话过程.共5 张截图。


 


得到的博客地址是https://tnmb.luckypoem.workers.dev/   支持分页.
 https://tnmb.luckypoem.workers.dev/writings/fh  能显示视频
 
项目地址:
 https://github.com/timofeysie/nextjs-markdown-blog
 https://github.com/brightmann/tnmb
在此处 https://github.com/brightmann/tnmb/tree/master/writings,新建源帖fh.md ,内容为:
---
title: "战马"
date: "2026-06-07 17:49:00"
---
 
此处写正文或html codes.
(详见 https://github.com/brightmann/tnmb/blob/master/writings/fh.md?plain=1)