mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-11-01 08:10:48 +00:00
This is based on the code we used for Docker Editions, and
will format an external drive, to be used for example for
`/var` for Docker image persistence.
It does not `mount` the drive yet, as splitting format and mount
gives better modularity.
Example yaml fragment:
```
- name: format
image: "mobylinux/format:097d4f22b20f976b1f89d8f0b8a5d074d35b856c"
binds:
- /dev:/dev
capabilities:
- CAP_SYS_ADMIN
- CAP_MKNOD
```
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
14 lines
185 B
Docker
14 lines
185 B
Docker
FROM alpine:3.5
|
|
|
|
RUN \
|
|
apk update && apk upgrade -a && \
|
|
apk add --no-cache \
|
|
e2fsprogs \
|
|
e2fsprogs-extra \
|
|
jq \
|
|
sfdisk \
|
|
&& true
|
|
|
|
COPY . ./
|
|
CMD ["/bin/sh", "/format.sh"]
|