2020-05-04 04:13:33 +08:00
|
|
|
################################################
|
|
|
|
# autotools-linux
|
2024-01-25 23:32:17 +08:00
|
|
|
FROM toxchat/c-toxcore:sources AS sources
|
2023-12-25 08:28:36 +08:00
|
|
|
FROM ubuntu:22.04
|
|
|
|
|
2023-12-27 03:39:22 +08:00
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
|
2023-12-25 08:28:36 +08:00
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
libconfig-dev \
|
|
|
|
libopus-dev \
|
|
|
|
libsodium-dev \
|
|
|
|
libtool \
|
|
|
|
libvpx-dev \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN groupadd -r -g 1000 builder \
|
|
|
|
&& useradd -m --no-log-init -r -g builder -u 1000 builder
|
|
|
|
USER builder
|
|
|
|
|
|
|
|
WORKDIR /home/builder
|
2020-05-04 04:13:33 +08:00
|
|
|
|
2024-01-25 23:32:17 +08:00
|
|
|
# Copy autotools-specific build scripts not present in the sources image.
|
|
|
|
# These change less frequently than the sources, thus are copied first.
|
2022-02-19 06:08:46 +08:00
|
|
|
COPY --chown=builder:builder . /home/builder/c-toxcore/
|
2024-01-25 23:32:17 +08:00
|
|
|
|
|
|
|
# Copy the sources and run the build.
|
|
|
|
COPY --chown=builder:builder --from=sources /src/ /home/builder/c-toxcore/
|
|
|
|
|
2022-02-19 06:08:46 +08:00
|
|
|
WORKDIR /home/builder/c-toxcore
|
|
|
|
RUN CC=gcc .github/scripts/autotools-linux
|