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

Added docker files to build znc for arm arch #3

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions full/Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM znc:arm-slim

# znc:slim removed them. Install them again.
RUN set -x \
&& apk add --no-cache \
build-base \
icu-dev \
libressl-dev \
perl \
python3
COPY znc-build-modules.sh /
2 changes: 1 addition & 1 deletion slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN set -x \
&& cd / && rm -rf /znc-src

COPY docker-entrypoint.sh /

RUN chmod +x /docker-entrypoint.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already executable...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i've tried build the image for arm , i've got some errors relative to this, saying that i dont have permissions to run the script. After i've added this line , the error was fixed .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you accidentally cleared the executable bit from the file in your git checkout before building the image? Or some strange filesystem you use did that for you?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try build the image again on my rpi and my laptop to see if this occurs again.

VOLUME /znc-data

ENTRYPOINT ["/docker-entrypoint.sh"]
52 changes: 52 additions & 0 deletions slim/Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM arm32v6/alpine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to avoid the exact copy of amd64 Dockerfile. Do you know that in case of such copypaste the copies will always diverge, and various changes will accidentally go to only one copy?


ENV GPG_KEY D5823CACB477191CAC0075555AE420CC0209989E

# modperl and modpython are built, but won't be loadable.
# :full image installs perl and python3 again, making these modules loadable.

# musl silently doesn't support AI_ADDRCONFIG yet, and ZNC doesn't support Happy Eyeballs yet.
# Together they cause very slow connection. So for now IPv6 is disabled here.
ARG CONFIGUREFLAGS="--prefix=/opt/znc --enable-cyrus --enable-perl --enable-python --disable-ipv6"
ARG MAKEFLAGS=""

ENV ZNC_VERSION 1.6.5

RUN set -x \
&& adduser -S znc \
&& addgroup -S znc \
&& apk add --no-cache --virtual runtime-dependencies \
ca-certificates \
cyrus-sasl \
icu \
su-exec \
tini \
&& apk add --no-cache --virtual build-dependencies \
build-base \
curl \
cyrus-sasl-dev \
gnupg \
icu-dev \
libressl-dev \
perl-dev \
python3-dev \
&& mkdir /znc-src && cd /znc-src \
&& curl -fsSL "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" -o znc.tgz \
&& curl -fsSL "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz.sig" -o znc.tgz.sig \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "${GPG_KEY}" \
&& gpg --batch --verify znc.tgz.sig znc.tgz \
&& rm -rf "$GNUPGHOME" \
&& tar -zxf znc.tgz --strip-components=1 \
&& mkdir build && cd build \
&& ../configure ${CONFIGUREFLAGS} \
&& make $MAKEFLAGS \
&& make install \
&& apk del build-dependencies \
&& cd / && rm -rf /znc-src

COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
VOLUME /znc-data

ENTRYPOINT ["/docker-entrypoint.sh"]