Skip to content

Commit

Permalink
sanity checK
Browse files Browse the repository at this point in the history
  • Loading branch information
plowsof committed Sep 30, 2024
1 parent 64ed8d7 commit 51346c9
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,3 @@ RUN chmod +x shared_functions.sh

# Single CMD with all required commands
RUN /bin/bash -c "source shared_functions.sh && check_debs" #todo: improve function name

# Stage 1: Confirm provided deb md5sums
FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as verifypackages

ENV SOURCE_DATE_EPOCH=1397818193

RUN apt-get update && \
apt-get install -y gnupg2 xz-utils wget

COPY shared_functions.sh shared_functions.sh
RUN chmod +x shared_functions.sh

# Single CMD with all required commands
RUN /bin/bash -c "source shared_functions.sh && verify_packages" #todo: improve function name

# Stage 2: Downloader
FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as downloader

ENV SOURCE_DATE_EPOCH=1397818193

WORKDIR /sources

COPY shared_functions.sh /sources/shared_functions.sh
RUN chmod +x /sources/shared_functions.sh

# Single CMD with all required commands
RUN /bin/bash -c "source shared_functions.sh && get_debs_downloader && download_all_tarballs"

# Stage 3: Git Cloner
FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as gitcloner

ARG QT_VERSION=v5.15.14-lts-lgpl
ENV SOURCE_DATE_EPOCH=1397818193

WORKDIR /sources

COPY shared_functions.sh /sources/shared_functions.sh
RUN chmod +x /sources/shared_functions.sh

RUN /bin/bash -c "source shared_functions.sh && get_debs_gitcloner"
RUN --network=none /bin/bash -c "source shared_functions.sh && install_debs_gitcloner"
RUN /bin/bash -c "source shared_functions.sh && clone_git_repos"

# Stage 4: Builder
FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6 as builder

ARG THREADS=3

ENV CFLAGS="-fPIC"
ENV CPPFLAGS="-fPIC"
ENV CXXFLAGS="-fPIC"

WORKDIR /sources

# Copy sources from downloader and gitcloner stages
COPY --from=downloader /sources /sources
COPY --from=gitcloner /sources /sources

COPY shared_functions.sh /sources/shared_functions.sh
RUN chmod +x /sources/shared_functions.sh

# Build with --network=none
RUN /bin/bash -c "ls -la"
RUN --network=none /bin/bash -c "source shared_functions.sh && install_debs_downloader && install_debs_tarballs && extract_all_tarballs && build_all"

0 comments on commit 51346c9

Please sign in to comment.