Skip to content

Commit 92ade58

Browse files
committed
Refresh initial container post, dropping initial writable layer
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent d9e1dfe commit 92ade58

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

_posts/2024-03-08-containers.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,20 @@ host's IP address.
114114
![](/assets/img/nginx-welcome.png)
115115
_Nginx default landing page._
116116

117-
## Customizing Content
118117

119-
Deceivingly enough, Docker containers have a thin writable layer that
120-
allows changing just about any file in the image. The big *HOWEVER*
121-
though is that this layer doesn't survive configuration changes or,
122-
most importantly, image upgrades.
118+
> See the [end of this post](#container-content-in-device-configuration)
119+
> for how to store container file content in the Infix configuration!
120+
> Meaning custom(er) builds of Infix can bundle a built-in container's
121+
> initial configuration in the Infix `factory-config`, which can be very
122+
> useful when deploying at new installations.
123+
{: .prompt-info }
123124

124-
> Use Volumes! They are a specialized type of "mount", for people
125-
> familiar with UNIX systems. Infix currently supports *named mounts*
126-
> that provide a *persistent* writable layer for containers.
127-
{: .prompt-tip }
125+
## Customizing Content
126+
127+
Containers in Infix are created *read-only by default*, to change the
128+
content, or store state data across host restarts and upgrades, use
129+
volumes. They are a specialized type of "mount", for people familiar
130+
with UNIX systems.
128131

129132
Here's how to add a volume to your container:
130133

@@ -144,7 +147,7 @@ in the container:
144147
admin@infix:/> container shell web
145148
d95ce9f7674d:/# vi /usr/share/nginx/html/
146149
50x.html index.html
147-
d95ce9f7674d:/# vi /usr/share/nginx/html/index.html
150+
d95ce9f7674d:/# vi /usr/share/nginx/html/index.html
148151
... edit, save & exit from vi ...
149152
d95ce9f7674d:/#
150153
```
@@ -156,11 +159,6 @@ Save the best for last? A neat feature is that container content can be
156159
saved in the system's `startup-config` and therefore be automatically be
157160
backed up by administrators snapshotting the system.
158161

159-
> This also means that custom(er) builds of Infix can bundle a built-in
160-
> container's initial configuration in the Infix `factory-config`, which
161-
> can be very useful when deploying at new installations.
162-
{: .prompt-info }
163-
164162
This feature is perfectly suited for container applications that need a
165163
specific site setup. For example a configuration file. Here we use the
166164
same container image to bundle an `index.html` file:

0 commit comments

Comments
 (0)