Initial commit

This commit is contained in:
Nils Freydank 2020-04-29 09:20:00 +02:00
commit cedb111eeb
No known key found for this signature in database
GPG Key ID: BC5DC2998AAD2B21
4 changed files with 109 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
# ---> 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.*

19
COPYING-MIT Normal file
View 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.

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
#
# Dockerfile to add a precompiled glibc to an alpinelinux container.
# Copyright (C) 2020 by Nils Freydank <nils+container@holgersson.xyz>,
# published according to 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 alpine-x86_64:3.11.6 as builder
ENV GLIBC_VERSION="2.31-r0"
ENV ALPINE_ARCH="x86_64"
RUN apk add --no-cache --update-cache ca-certificates
# Grab upstreams GnuPG pubkey to verify downloads later on.
#RUN wget -q -O - https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub | \
# gpg --import -
RUN wget -O /etc/apk/keys/sgerrand.rsa.pub \
https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk
RUN apk add glibc-${GLIBC_VERSION}.apk
# Cleanup
RUN rm -rf ~/.gnupg /var/cache/* glibc-${GLIBC_VERSION}.apk \
/etc/apk/keys/sgerrand.rsa.pub
### Create the actual image.
FROM scratch
MAINTAINER Nils Freydank "nils+container@holgersson.xyz"
COPY --from=builder . .

37
README.rst Normal file
View File

@ -0,0 +1,37 @@
alpine-x86_64-glibc
===================
This repository contains a dockerfile to add a `pre-built glibc`_ to an
otherwise emtpy alpine container. This is necessary for some software
that is shipped precompiled and linked against glibc only. `Alpine Linux`_
itself uses the much smaller and faster `musl libc`_ (which is also considered
often as a more secure replacement for the glibc).
Usage
-----
To use this image you need the base alpine image (either from a registry, then
you need to edit the Dockerfile, or -- preferred -- self-build as alpine-x86_64)
and podman or docker installed. Then simply build the image based on the
dockerfile:
.. code:: shell
podman build . -t alpine-glibc-x86_64:3.11.6_2.31-r0
The tag is a suggestion to include both the alpine and the glibc version.
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
.. _`pre-built glibc`: https://github.com/sgerrand/alpine-pkg-glibc/releases
.. _`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