Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alpine variant #7

Merged
merged 1 commit into from
Mar 30, 2016
Merged

Add alpine variant #7

merged 1 commit into from
Mar 30, 2016

Conversation

tianon
Copy link
Collaborator

@tianon tianon commented Mar 30, 2016

Closes #4 (changes carried here)

diff --git a/debian/Dockerfile b/alpine/Dockerfile
index 912f926..5c889f7 100644
--- a/debian/Dockerfile
+++ b/alpine/Dockerfile
@@ -1,17 +1,7 @@
-FROM debian:jessie
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
-       ca-certificates \
-       curl \
-       libdatetime-perl \
-       libglib2.0-0 \
-       libwww-perl \
-       perl \
-       wget \
-   && rm -rf /var/lib/apt/lists/*
+FROM alpine:3.3

 ENV HOME /home/user
-RUN useradd --create-home --home-dir $HOME user \
+RUN adduser -u 1001 -D user \
    && mkdir -p $HOME/.irssi \
    && chown -R user:user $HOME

@@ -19,23 +9,23 @@ ENV LANG C.UTF-8

 ENV IRSSI_VERSION 0.8.19

-RUN buildDeps=' \
+RUN set -x \
+   && apk add --no-cache --virtual .build-deps \
        autoconf \
        automake \
-       bzip2 \
-       libglib2.0-dev \
-       libncurses-dev \
-       libperl-dev \
-       libssl-dev \
+       curl \
+       gcc \
+       glib-dev \
+       gnupg \
+       libc-dev \
        libtool \
        lynx \
        make \
-       pkg-config \
-       xz-utils \
-   ' \
-   && set -x \
-   && apt-get update && apt-get install -y $buildDeps --no-install-recommends \
-   && rm -rf /var/lib/apt/lists/* \
+       make \
+       ncurses-dev \
+       openssl-dev \
+       perl-dev \
+       pkgconf \
    && curl -fsSL "https://github.com/irssi/irssi/releases/download/${IRSSI_VERSION}/irssi-${IRSSI_VERSION}.tar.xz" -o /tmp/irssi.tar.xz \
    && curl -fsSL "https://github.com/irssi/irssi/releases/download/${IRSSI_VERSION}/irssi-${IRSSI_VERSION}.tar.xz.asc" -o /tmp/irssi.tar.xz.asc \
    && export GNUPGHOME="$(mktemp -d)" \
@@ -43,19 +33,27 @@ RUN buildDeps=' \
    && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 7EE65E3082A5FB06AC7C368D00CCB587DDBEF0E1 \
    && gpg --batch --verify /tmp/irssi.tar.xz.asc /tmp/irssi.tar.xz \
    && rm -r "$GNUPGHOME" /tmp/irssi.tar.xz.asc \
-   && mkdir -p /usr/src/irssi \
-   && tar -xf /tmp/irssi.tar.xz -C /usr/src/irssi --strip-components 1 \
+   && mkdir -p /usr/src \
+   && tar -xJf /tmp/irssi.tar.bz2 -C /usr/src \
    && rm /tmp/irssi.tar.xz \
-   && cd /usr/src/irssi \
+   && cd /usr/src/irssi-$IRSSI_VERSION \
    && ./configure \
        --enable-true-color \
        --with-bot \
        --with-proxy \
        --with-socks \
-   && make -j$(nproc) \
+   && make -j$(getconf _NPROCESSORS_ONLN) \
    && make install \
-   && rm -rf /usr/src/irssi \
-   && apt-get purge -y --auto-remove $buildDeps
+   && rm -rf /usr/src/irssi-$IRSSI_VERSION \
+   && runDeps="$( \
+       scanelf --needed --nobanner --recursive /usr/local \
+           | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
+           | sort -u \
+           | xargs -r apk info --installed \
+           | sort -u \
+   )" \
+   && apk add --no-cache --virtual .irssi-rundeps $runDeps perl-libwww \
+   && apk del .build-deps

 WORKDIR $HOME
 VOLUME $HOME/.irssi

@tianon
Copy link
Collaborator Author

tianon commented Mar 30, 2016

The changes from #4 are pretty minor; here's the proposed output of generate-stackbrew-library.sh:

$ ./generate-stackbrew-library.sh
# maintainer: Jessie Frazelle <jess@docker.com> (@jfrazelle)
# maintainer: Tianon Gravi <admwiggin@gmail.com> (@tianon)

0.8.19: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
0.8: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
0: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
latest: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
0.8.19-debian: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
0.8-debian: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
0-debian: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian
debian: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d debian

0.8.19-alpine: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d alpine
0.8-alpine: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d alpine
0-alpine: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d alpine
alpine: git://github.com/jfrazelle/irssi@477e642fb3e7f25127ff84d4f237d86c42333e8d alpine

@jessfraz
Copy link
Owner

NICE! LGTM

On Wed, Mar 30, 2016 at 12:42 PM, Tianon Gravi notifications@github.com
wrote:

The changes from #4 #4 are
pretty minor; here's the proposed output of generate-stackbrew-library.sh:

$ ./generate-stackbrew-library.sh

maintainer: Jessie Frazelle jess@docker.com (@jfrazelle)

maintainer: Tianon Gravi admwiggin@gmail.com (@tianon)

0.8.19: git://github.com/jfrazelle/irssi@477e642 debian0.8: git://github.com/jfrazelle/irssi@477e642 debian0: git://github.com/jfrazelle/irssi@477e642 debianlatest: git://github.com/jfrazelle/irssi@477e642 debian0.8.19-debian: git://github.com/jfrazelle/irssi@477e642 debian0.8-debian: git://github.com/jfrazelle/irssi@477e642 debian0-debian: git://github.com/jfrazelle/irssi@477e642 debiandebian: git://github.com/jfrazelle/irssi@477e642 debian
0.8.19-alpine: git://github.com/jfrazelle/irssi@477e642 alpine0.8-alpine: git://github.com/jfrazelle/irssi@477e642 alpine0-alpine: git://github.com/jfrazelle/irssi@477e642 alpinealpine: git://github.com/jfrazelle/irssi@477e642 alpine


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#7 (comment)

Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3

@tianon
Copy link
Collaborator Author

tianon commented Mar 30, 2016

Heh, took another look over the diff and realized we had make listed twice for Alpine, so that's fixed now too.

@jessfraz
Copy link
Owner

\o/ you da bomb

On Wed, Mar 30, 2016 at 12:45 PM, Tianon Gravi notifications@github.com
wrote:

Heh, took another look over the diff and realized we had make listed
twice for Alpine, so that's fixed now too.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3

@tianon tianon merged commit be62ea3 into master Mar 30, 2016
@tianon tianon deleted the alpine branch March 30, 2016 19:56
tianon added a commit to infosiftr/stackbrew that referenced this pull request Apr 4, 2016
- `django`: 1.9.5
- `docker`: 1.11.0-rc3, add tune2fs and mkfs.xfs (docker-library/docker#10)
- `elasticsearch`: 2.3.1
- `golang`: force-enable `-fno-PIC` in Alpine (docker-library/golang#91)
- `irssi`: 0.8.19 (jessfraz/irssi#6), add Alpine variant (jessfraz/irssi#7)
- `java`: 9~b112-2 (still fails to build), Alpine to 8.77.03-r0 (8u77), fix Alpine tags to reference the proper version
- `julia`: 0.4.5
- `mariadb`: 10.1.13+maria-1~jessie
- `mongo`: 3.0.11
- `mysql`: `ENTRYPOINT` consistency (`docker-entrypoint.sh` with a compatibility symlink)
- `owncloud`: add `exif` module (docker-library/owncloud#53)
- `php`: 7.0.5, 5.6.20, 5.5.34, always enable `mbstring` (docker-library/php#211)
- `postgres`: 9.5.2-1.pgdg80+1, 9.4.7-1.pgdg80+1, 9.3.12-1.pgdg80+1, 9.2.16-1.pgdg80+1, 9.1.21-1.pgdg80+1, local interfaces during init (docker-library/postgres#136)
- `pypy`: 5.0.1
- `python`: fix `python-config` symlink (docker-library/python#99)
- `rocket.chat`: 0.24.0
- `ruby`: 2.1.9, switch `libedit` to `readline` for `irb` (docker-library/ruby#76)
RichardScothern pushed a commit to RichardScothern/official-images that referenced this pull request Jun 14, 2016
- `django`: 1.9.5
- `docker`: 1.11.0-rc3, add tune2fs and mkfs.xfs (docker-library/docker#10)
- `elasticsearch`: 2.3.1
- `golang`: force-enable `-fno-PIC` in Alpine (docker-library/golang#91)
- `irssi`: 0.8.19 (jessfraz/irssi#6), add Alpine variant (jessfraz/irssi#7)
- `java`: 9~b112-2 (still fails to build), Alpine to 8.77.03-r0 (8u77), fix Alpine tags to reference the proper version
- `julia`: 0.4.5
- `mariadb`: 10.1.13+maria-1~jessie
- `mongo`: 3.0.11
- `mysql`: `ENTRYPOINT` consistency (`docker-entrypoint.sh` with a compatibility symlink)
- `owncloud`: add `exif` module (docker-library/owncloud#53)
- `php`: 7.0.5, 5.6.20, 5.5.34, always enable `mbstring` (docker-library/php#211)
- `postgres`: 9.5.2-1.pgdg80+1, 9.4.7-1.pgdg80+1, 9.3.12-1.pgdg80+1, 9.2.16-1.pgdg80+1, 9.1.21-1.pgdg80+1, local interfaces during init (docker-library/postgres#136)
- `pypy`: 5.0.1
- `python`: fix `python-config` symlink (docker-library/python#99)
- `rocket.chat`: 0.24.0
- `ruby`: 2.1.9, switch `libedit` to `readline` for `irb` (docker-library/ruby#76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants