@@ -14,18 +14,18 @@
1414 <para>
1515 You create a container with identifier <literal>foo</literal> as follows:
1616<screen>
17−# nixos-container create foo
17+<prompt># </prompt>nixos-container create <replaceable>foo</replaceable>
1818</screen>
1919 This creates the container’s root directory in
20− <filename>/var/lib/containers/foo</filename> and a small configuration file
21− in <filename>/etc/containers/foo.conf</filename>. It also builds the
20+ <filename>/var/lib/containers/<replaceable>foo</replaceable></filename> and a small configuration file
21+ in <filename>/etc/containers/<replaceable>foo</replaceable>.conf</filename>. It also builds the
2222 container’s initial system configuration and stores it in
23− <filename>/nix/var/nix/profiles/per-container/foo/system</filename>. You can
23+ <filename>/nix/var/nix/profiles/per-container/<replaceable>foo</replaceable>/system</filename>. You can
2424 modify the initial configuration of the container on the command line. For
2525 instance, to create a container that has <command>sshd</command> running,
2626 with the given public key for <literal>root</literal>:
2727<screen>
28−# nixos-container create foo --config '
28+<prompt># </prompt>nixos-container create <replaceable>foo</replaceable> --config '
2929 <xref linkend="opt-services.openssh.enable"/> = true;
3030 <link linkend="opt-users.users._name_.openssh.authorizedKeys.keys">users.users.root.openssh.authorizedKeys.keys</link> = ["ssh-dss AAAAB3N…"];
3131'
@@ -34,7 +34,7 @@
3434 as container IP. This behavior can be altered by setting <literal>--host-address</literal> and
3535 <literal>--local-address</literal>:
3636<screen>
37−# nixos-container create test --config-file test-container.nix \
37+<prompt># </prompt>nixos-container create test --config-file test-container.nix \
3838 --local-address 10.235.1.2 --host-address 10.235.1.1
3939</screen>
4040 </para>
@@ -42,7 +42,7 @@
4242 <para>
4343 Creating a container does not start it. To start the container, run:
4444<screen>
45−# nixos-container start foo
45+<prompt># </prompt>nixos-container start <replaceable>foo</replaceable>
4646</screen>
4747 This command will return as soon as the container has booted and has reached
4848 <literal>multi-user.target</literal>. On the host, the container runs within
@@ -51,7 +51,7 @@
5151 Thus, if something went wrong, you can get status info using
5252 <command>systemctl</command>:
5353<screen>
54−# systemctl status container@foo
54+<prompt># </prompt>systemctl status container@<replaceable>foo</replaceable>
5555</screen>
5656 </para>
5757
@@ -59,22 +59,22 @@
5959 If the container has started successfully, you can log in as root using the
6060 <command>root-login</command> operation:
6161<screen>
62−# nixos-container root-login foo
63−[root@foo:~]#
62+<prompt># </prompt>nixos-container root-login <replaceable>foo</replaceable>
63+<prompt>[root@foo:~]#</prompt>
6464</screen>
6565 Note that only root on the host can do this (since there is no
6666 authentication). You can also get a regular login prompt using the
6767 <command>login</command> operation, which is available to all users on the
6868 host:
6969<screen>
70−# nixos-container login foo
70+<prompt># </prompt>nixos-container login <replaceable>foo</replaceable>
7171foo login: alice
7272Password: ***
7373</screen>
7474 With <command>nixos-container run</command>, you can execute arbitrary
7575 commands in the container:
7676<screen>
77−# nixos-container run foo -- uname -a
77+<prompt># </prompt>nixos-container run <replaceable>foo</replaceable> -- uname -a
7878Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
7979</screen>
8080 </para>
@@ -85,18 +85,18 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
8585 <literal>/var/lib/container/<replaceable>name</replaceable>/etc/nixos/configuration.nix</literal>,
8686 and run
8787<screen>
88−# nixos-container update foo
88+<prompt># </prompt>nixos-container update <replaceable>foo</replaceable>
8989</screen>
9090 This will build and activate the new configuration. You can also specify a
9191 new configuration on the command line:
9292<screen>
93−# nixos-container update foo --config '
93+<prompt># </prompt>nixos-container update <replaceable>foo</replaceable> --config '
9494 <xref linkend="opt-services.httpd.enable"/> = true;
9595 <xref linkend="opt-services.httpd.adminAddr"/> = "foo@example.org";
9696 <xref linkend="opt-networking.firewall.allowedTCPPorts"/> = [ 80 ];
9797'
9898
99−# curl http://$(nixos-container show-ip foo)/
99+<prompt># </prompt>curl http://$(nixos-container show-ip <replaceable>foo</replaceable>)/
100100<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
101101</screen>
102102 However, note that this will overwrite the container’s
@@ -117,7 +117,7 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
117117 by using <command>systemctl</command> on the container’s service unit. To
118118 destroy a container, including its file system, do
119119<screen>
120−# nixos-container destroy foo
120+<prompt># </prompt>nixos-container destroy <replaceable>foo</replaceable>
121121</screen>
122122 </para>
123123</section>