2020-05-04 04:13:33 +08:00
|
|
|
################################################
|
|
|
|
# autotools-linux
|
2021-12-14 23:35:37 +08:00
|
|
|
FROM ubuntu:20.04
|
2020-05-04 04:13:33 +08:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
2021-12-14 23:35:37 +08:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
libconfig-dev \
|
|
|
|
libopus-dev \
|
2020-05-04 04:13:33 +08:00
|
|
|
libtool \
|
2021-12-14 23:35:37 +08:00
|
|
|
libvpx-dev \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
2020-05-04 04:13:33 +08:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2021-12-14 23:35:37 +08:00
|
|
|
|
|
|
|
RUN groupadd -r -g 1000 builder \
|
|
|
|
&& useradd -m --no-log-init -r -g builder -u 1000 builder
|
|
|
|
USER builder
|
2020-05-04 04:13:33 +08:00
|
|
|
|
|
|
|
# Copy minimal files to run "autotools-linux install", so we can avoid
|
|
|
|
# rebuilding nacl and other things when only source files change.
|
2021-12-14 23:35:37 +08:00
|
|
|
RUN mkdir -p /home/builder/build/c-toxcore /home/builder/cache
|
|
|
|
WORKDIR /home/builder/build/c-toxcore
|
2022-01-10 09:17:46 +08:00
|
|
|
COPY --chown=builder:builder .github/scripts/ /home/builder/build/c-toxcore/.github/scripts/
|
|
|
|
RUN .github/scripts/autotools-linux install
|
2020-05-04 04:13:33 +08:00
|
|
|
|
|
|
|
# Now copy the rest of the sources and run the build.
|
2021-12-14 23:35:37 +08:00
|
|
|
COPY --chown=builder:builder . /home/builder/build/c-toxcore/
|
2022-01-10 09:17:46 +08:00
|
|
|
RUN CC=gcc .github/scripts/autotools-linux script
|