Initial commit
This commit is contained in:
commit
8f394f6ab6
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# ---> Vim
|
||||||
|
# Swap
|
||||||
|
[._]*.s[a-v][a-z]
|
||||||
|
[._]*.sw[a-p]
|
||||||
|
[._]s[a-rt-v][a-z]
|
||||||
|
[._]ss[a-gi-z]
|
||||||
|
[._]sw[a-p]
|
||||||
|
|
||||||
|
# Session
|
||||||
|
Session.vim
|
||||||
|
|
||||||
|
# Temporary
|
||||||
|
.netrwhist
|
||||||
|
*~
|
||||||
|
# Auto-generated tag files
|
||||||
|
tags
|
||||||
|
# Persistent undo
|
||||||
|
[._]*.un~
|
||||||
|
|
||||||
|
# ---> Kate
|
||||||
|
# Swap Files #
|
||||||
|
.*.kate-swp
|
||||||
|
.swp.*
|
||||||
|
|
||||||
|
# ---> Local stuff
|
||||||
|
# Intermediate Tar archives
|
||||||
|
*.tar*
|
19
COPYING-MIT
Normal file
19
COPYING-MIT
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright 2020 Nils Freydank
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile to create an alpinelinux container.
|
||||||
|
# Copyright (C) 2020 by Nils Freydank <nils+container@holgersson.xyz>,
|
||||||
|
# published under the terms of the MIT license.
|
||||||
|
#
|
||||||
|
# Note: This copyright and license only affects the docker/podman file itself.
|
||||||
|
# The installed softwarecomponents have their own respective licsenses!
|
||||||
|
|
||||||
|
FROM scratch as builder
|
||||||
|
ENV GLIBC_VERSION="2.31-r0"
|
||||||
|
ENV ALPINE_VERSION="3.11.6"
|
||||||
|
ENV ALPINE_ARCH="x86_64"
|
||||||
|
# Copy the rootfs from outside.
|
||||||
|
ADD alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz /
|
||||||
|
|
||||||
|
# Create the actual image without the env/version layers.
|
||||||
|
FROM scratch
|
||||||
|
MAINTAINER Nils Freydank "nils+container@holgersson.xyz"
|
||||||
|
COPY --from=builder . .
|
43
README.rst
Normal file
43
README.rst
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
alpine-x86_64
|
||||||
|
=============
|
||||||
|
|
||||||
|
This repository contains a dockerfile to create a most trustworthy base image
|
||||||
|
for further containers. The distribution `Alpine Linux`_ is used inside.
|
||||||
|
|
||||||
|
Note that alpine linux uses the `musl libc`_, which is faster and far smaller
|
||||||
|
than the typically used glibc, but also far less supported by vendors shipping
|
||||||
|
closed source programms as pre compiled binaries.
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
To build this container as a base for other images get sure wget, gnupg and
|
||||||
|
`podman`_/libpod are installed and set up. Then run the setup script
|
||||||
|
|
||||||
|
.. code:: shell
|
||||||
|
|
||||||
|
./prepare-and-build.sh
|
||||||
|
|
||||||
|
which will generate a container named alpine-${ARCH}:${VERSION}, e.g.
|
||||||
|
alpine-x86_64 (with default parameters). Note that you can overwrite the
|
||||||
|
params directly when calling the script, e.g. as
|
||||||
|
|
||||||
|
.. code:: shell
|
||||||
|
|
||||||
|
ARCH="x86" prepare-and-build.sh
|
||||||
|
|
||||||
|
for a 32bit installation.
|
||||||
|
|
||||||
|
Author and Copying
|
||||||
|
==================
|
||||||
|
|
||||||
|
This repository is authored by `Nils Freydank`_. You can use, modify and
|
||||||
|
share this code under the terms of the MIT license (see the file
|
||||||
|
COPYING-MIT for details).
|
||||||
|
|
||||||
|
.. links
|
||||||
|
|
||||||
|
.. _`Alpine Linux`: https://alpinelinux.org/about/
|
||||||
|
.. _`musl libc`: https://musl.libc.org/
|
||||||
|
.. _`podman`: https://github.com/containers/libpod/
|
||||||
|
.. _`Nils Freydank`: mailto:nils+container@holgersson.xyz?Subject:\ alpine\ podman
|
20
prepare-and-build.sh
Executable file
20
prepare-and-build.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Shell script to fetch and verify alpine
|
||||||
|
# Copyright 2020 by Nils Freydank <nils+container@holgersson.xyz>,
|
||||||
|
# published according to terms of the MIT license.
|
||||||
|
|
||||||
|
set -xeu
|
||||||
|
PATH="/usr/bin:/usr/sbin/:/bin/:/usr/bin"
|
||||||
|
|
||||||
|
VERSION="${VERSION:-3.11.6}"
|
||||||
|
ARCH="${ARCH:-x86_64}"
|
||||||
|
|
||||||
|
# Fetch!
|
||||||
|
wget -c http://dl-cdn.alpinelinux.org/alpine/v${VERSION%.[0-9]*}/releases/${ARCH}/alpine-minirootfs-${VERSION}-${ARCH}.tar.gz{,.asc}
|
||||||
|
# Verify!
|
||||||
|
gpg --verify alpine-minirootfs-${VERSION}-${ARCH}.tar.gz{.asc,}
|
||||||
|
# Do magic!
|
||||||
|
podman build . -t alpine-${ARCH}:${VERSION}
|
||||||
|
# Cleanup!
|
||||||
|
rm -f alpine-minirootfs-${VERSION}-${ARCH}.tar.gz{.asc,}
|
Loading…
x
Reference in New Issue
Block a user