Skip to content

Commit

Permalink
add readme, discord notifs, cleanup dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hydazz committed Jan 20, 2023
1 parent 73868b7 commit eae304a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM ubuntu
LABEL maintainer="Sasha Gerrand <[email protected]>"

LABEL maintainer="hydazz"

# environment settings
ENV DEBIAN_FRONTEND=noninteractive \
GLIBC_VERSION=2.36 \
PREFIX_DIR=/usr/glibc-compat
RUN apt-get -q update \
&& apt-get -qy install \

RUN \
apt-get update && \
apt-get install -y \
bison \
build-essential \
gawk \
Expand All @@ -13,6 +17,7 @@ RUN apt-get -q update \
python3 \
texinfo \
wget
COPY configparams /glibc-build/configparams
COPY builder /builder

COPY root/ /

ENTRYPOINT ["/builder"]
14 changes: 14 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ pipeline {
}
}
post {
always {
script{
if (currentBuild.currentResult == "SUCCESS"){
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins.io/JENKINS/attachments/2916393/57409617.png","embeds": [{"color": 1681177,\
"description": "**docker-glibc-builder Build '${BUILD_NUMBER}' Results**\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
else {
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins.io/JENKINS/attachments/2916393/57409617.png","embeds": [{"color": 16711680,\
"description": "**docker-glibc-builder Build '${BUILD_NUMBER}' Results**\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
}
}
cleanup {
cleanWs()
}
Expand Down
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# docker-glibc-builder

A glibc binary package builder in Docker. Produces a glibc binary package that can be imported into a rootfs to run applications dynamically linked against glibc.
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.imagegenius.io%2Fjob%2FTools%2Fjob%2Fdocker-glibc-builder%2F&logo=jenkins)](https://ci.imagegenius.io/job/Tools/job/docker-glibc-builder/)

## Usage
This is a modified version of [sgerrand/docker-glibc-builder](https://github.com/sgerrand/docker-glibc-builder) that automatically builds a glibc binary package for `x86_64` AND `aarch64` for use in alpine docker images.

Build a glibc package based on version 2.36 with a prefix of `/usr/glibc-compat`:

docker run --rm --env STDOUT=1 sgerrand/glibc-builder 2.36 /usr/glibc-compat > glibc-bin.tar.gz

You can also keep the container around and copy out the resulting file:

docker run --name glibc-binary sgerrand/glibc-builder 2.36 /usr/glibc-compat
docker cp glibc-binary:/glibc-bin-2.36.tar.gz ./
docker rm glibc-binary
These binaries are then used by [imagegenius/aports](https://github.com/imagegenius/aports) to build glibc packages for `x86_64` and `aarch64` and are available in a [docker baseimage](https://github.com/imagegenius/docker-baseimage-alpine-glibc) and as alpine packages in the [imagegenius repo](https://packages.imagegenius.io/).
0 builder → root/builder
100755 → 100644
File renamed without changes.
File renamed without changes.

0 comments on commit eae304a

Please sign in to comment.