2018-07-12 15:28:59 +02:00
|
|
|
FROM ubuntu:bionic
|
|
|
|
|
|
|
|
# Build and base stuff
|
|
|
|
# (zlib1g-dev and libssl-dev are needed for the Qt host binary builds, but should not be used by target binaries)
|
2019-03-22 11:51:33 +01:00
|
|
|
# We split this up into multiple RUN lines as we might need to retry multiple times on Travis. This way we allow better
|
|
|
|
# cache usage.
|
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get update && apt-get install -y git
|
|
|
|
RUN apt-get update && apt-get install -y g++
|
|
|
|
RUN apt-get update && apt-get install -y autotools-dev libtool m4 automake autoconf pkg-config
|
|
|
|
RUN apt-get update && apt-get install -y zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake
|
|
|
|
RUN apt-get update && apt-get install -y python3 python3-dev
|
|
|
|
RUN apt-get update && apt-get install -y python3-pip
|
2018-07-12 15:28:59 +02:00
|
|
|
|
|
|
|
# Python stuff
|
|
|
|
RUN pip3 install pyzmq # really needed?
|
2019-10-16 11:48:46 +02:00
|
|
|
RUN pip3 install jinja2
|
2018-07-12 15:28:59 +02:00
|
|
|
|
2024-12-17 20:59:46 +01:00
|
|
|
# neobytes_hash
|
|
|
|
RUN git clone https://github.com/neobytes-project/neobytes_hash
|
|
|
|
RUN cd neobytes_hash && python3 setup.py install
|
2018-07-12 15:28:59 +02:00
|
|
|
|
|
|
|
ARG USER_ID=1000
|
|
|
|
ARG GROUP_ID=1000
|
|
|
|
|
|
|
|
# add user with specified (or default) user/group ids
|
|
|
|
ENV USER_ID ${USER_ID}
|
|
|
|
ENV GROUP_ID ${GROUP_ID}
|
2024-12-17 20:59:46 +01:00
|
|
|
RUN groupadd -g ${GROUP_ID} neobytes
|
|
|
|
RUN useradd -u ${USER_ID} -g neobytes -s /bin/bash -m -d /neobytes neobytes
|
2018-07-12 15:28:59 +02:00
|
|
|
|
|
|
|
# Extra packages
|
|
|
|
ARG BUILD_TARGET=linux64
|
|
|
|
ADD matrix.sh /tmp/matrix.sh
|
|
|
|
RUN . /tmp/matrix.sh && \
|
|
|
|
if [ -n "$DPKG_ADD_ARCH" ]; then dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi && \
|
2019-03-22 11:51:33 +01:00
|
|
|
if [ -n "$PACKAGES" ]; then apt-get update && apt-get install -y --no-install-recommends --no-upgrade $PACKAGES; fi
|
2018-07-12 15:28:59 +02:00
|
|
|
|
|
|
|
# Make sure std::thread and friends is available
|
|
|
|
# Will fail on non-win builds, but we ignore this
|
|
|
|
RUN \
|
|
|
|
update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix; \
|
|
|
|
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix; \
|
|
|
|
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix; \
|
|
|
|
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
|
|
|
|
exit 0
|
|
|
|
|
2024-12-17 20:59:46 +01:00
|
|
|
RUN mkdir /neobytes-src && \
|
2018-07-12 15:28:59 +02:00
|
|
|
mkdir -p /cache/ccache && \
|
|
|
|
mkdir /cache/depends && \
|
|
|
|
mkdir /cache/sdk-sources && \
|
2024-12-17 20:59:46 +01:00
|
|
|
chown $USER_ID:$GROUP_ID /neobytes-src && \
|
2018-07-12 15:28:59 +02:00
|
|
|
chown $USER_ID:$GROUP_ID /cache && \
|
|
|
|
chown $USER_ID:$GROUP_ID /cache -R
|
2024-12-17 20:59:46 +01:00
|
|
|
WORKDIR /neobytes-src
|
2018-07-12 15:28:59 +02:00
|
|
|
|
2024-12-17 20:59:46 +01:00
|
|
|
USER neobytes
|