Closed donnykurnia closed 3 years ago
Seems like an issue with the shell, isn't it? wrong shebang?
@EugenMayer any clue how to get it works? The build also failed in docker hub.
You only changed the version strings and get this error? Strange. I didn't run into this error.
The Dockerfile I'm using looks currently like this:
FROM alpine:edge
ARG OCAML_VERSION=4.12.0
RUN apk update \
&& apk add --no-cache --virtual .build-deps build-base coreutils \
&& wget http://caml.inria.fr/pub/distrib/ocaml-${OCAML_VERSION:0:4}/ocaml-${OCAML_VERSION}.tar.gz \
&& tar xvf ocaml-${OCAML_VERSION}.tar.gz -C /tmp \
&& cd /tmp/ocaml-${OCAML_VERSION} \
&& ./configure \
&& make world \
&& make opt \
&& umask 022 \
&& make install \
&& make clean \
&& apk del .build-deps \
&& rm -rf /tmp/ocaml-${OCAML_VERSION} \
&& rm /ocaml-${OCAML_VERSION}.tar.gz
ARG UNISON_VERSION=2.51.4_rc2
RUN apk update \
&& apk add --no-cache --virtual .build-deps \
build-base curl git \
&& apk add --no-cache \
bash inotify-tools monit supervisor rsync ruby \
&& curl -L https://github.com/bcpierce00/unison/archive/v$UNISON_VERSION.tar.gz | tar zxv -C /tmp \
&& cd /tmp/unison-${UNISON_VERSION} \
&& sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c \
&& make UISTYLE=text NATIVE=true STATIC=true \
&& cp src/unison src/unison-fsmonitor /usr/local/bin \
&& apk del binutils .build-deps \
&& apk add --no-cache libgcc libstdc++ \
&& rm -rf /tmp/unison-${UNISON_VERSION} \
&& apk add --no-cache --repository http://dl-4.alpinelinux.org/alpine/edge/testing/ shadow \
&& apk add --no-cache tzdata
RUN wget https://bootstrap.pypa.io/ez_setup.py -O - | python3
# These can be overridden later
ENV TZ="Europe/Helsinki" \
LANG="C.UTF-8" \
UNISON_DIR="/data" \
HOME="/root"
COPY entrypoint.sh /entrypoint.sh
COPY precopy_appsync.sh /usr/local/bin/precopy_appsync
COPY monitrc /etc/monitrc
RUN mkdir -p /docker-entrypoint.d \
&& chmod +x /entrypoint.sh \
&& mkdir -p /etc/supervisor.conf.d \
&& mkdir /unison \
&& chmod +x /usr/local/bin/precopy_appsync \
&& chmod u=rw,g=,o= /etc/monitrc
COPY supervisord.conf /etc/supervisord.conf
COPY supervisor.daemon.conf /etc/supervisor.conf.d/supervisor.daemon.conf
ENTRYPOINT ["/entrypoint.sh"]
CMD ["supervisord"]
############# ############# #############
############# /SHARED / #############
############# ############# #############
VOLUME /unison
EXPOSE 5000
I updated the versions, because the one in the repo didn't build on AppleSilicon and I wanted an ARM version of it. Build without any problems and seems to work without any issues so far. Using Docker 3.3.1.
@z1r0- I got the error in local, and also on the docker hub
...
configure: creating ./config.status
config.status: creating Makefile.build_config
config.status: creating Makefile.config
config.status: creating tools/eventlog_metadata
config.status: creating runtime/caml/m.h
config.status: creating runtime/caml/s.h
config.status: executing libtool commands
make: /bin/sh: Operation not permitted
make: make: Operation not permitted
make: *** [Makefile:141: coldstart] Error 127
make -C runtime all
The command '/bin/sh -c apk update && apk add --no-cache --virtual .build-deps build-base coreutils && wget http://caml.inria.fr/pub/distrib/ocaml-${OCAML_VERSION:0:4}/ocaml-${OCAML_VERSION}.tar.gz && tar xvf ocaml-${OCAML_VERSION}.tar.gz -C /tmp && cd /tmp/ocaml-${OCAML_VERSION} && ./configure && make world && make opt && umask 022 && make install && make clean && apk del .build-deps && rm -rf /tmp/ocaml-${OCAML_VERSION} && rm /ocaml-${OCAML_VERSION}.tar.gz' returned a non-zero code: 2
$ docker -v
Docker version 19.03.13, build 4484c46d9d
Looks like this is alpine issue https://github.com/alpinelinux/docker-alpine/issues/146
Ok, I can get it built using alpine 3.12 and latest unison version instead. https://hub.docker.com/r/donnykurnia/unison/tags
I try to build the image using the latest OCAML version to match the latest unison installed from homebrew. However, I'm stuck in compiling the ocaml steps when running the docker build, both in my local and in hub.docker.com. Here is the log from my local build. Is there any special options needed to build this image?