/
Dockerfile
75 lines (62 loc) · 1.93 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM alpine/git:2.40.1 AS git-clone
RUN mkdir /repos; \
git clone https://github.com/sba1/adtools /repos/adtools --depth 1; \
git clone https://github.com/bminor/binutils-gdb /repos/binutils-gdb; \
git clone https://github.com/coreutils/coreutils /repos/coreutils; \
git clone https://github.com/coreutils/gnulib /repos/gnulib
# The ubuntu:latest tag points to the "latest LTS", since that's the version recommended for general use.
FROM ubuntu:latest AS builder
ARG DEBIAN_FRONTEND=noninteractive
ARG GCC_VER
ARG CLIB2_REPO
ARG CLIB2_SRC
ENV GCC_VER=${GCC_VER}
ENV CLIB2_REPO=${CLIB2_REPO}
ENV CLIB2_SRC=${CLIB2_SRC}
COPY --from=walkero/lha-on-docker /usr/bin/lha /usr/bin/lha
ENV PACKAGES="autoconf \
automake \
autopoint \
bison \
ca-certificates \
curl \
dh-autoreconf \
flex \
g++-10 \
gettext \
git \
gperf \
gpg \
libfl2 \
libgmp-dev \
libmpc3 \
libmpc-dev \
libtool \
make \
mc \
nano \
patch \
python3 \
rsync \
texinfo \
wget \
xz-utils"
RUN apt-get update && \
apt-get -y --no-install-recommends install ${PACKAGES}; \
ln -s /usr/bin/g++-10 /usr/bin/g++; \
rm /usr/bin/gcc; \
ln -s /usr/bin/gcc-10 /usr/bin/gcc;
# Copy necessary repos from git-clone
COPY --from=git-clone /repos/adtools /opt/adtools
COPY --from=git-clone /repos/binutils-gdb /opt/adtools/binutils/repo
COPY --from=git-clone /repos/coreutils /opt/adtools/coreutils/repo
COPY --from=git-clone /repos/gnulib /opt/adtools/gnulib/repo
COPY misc /opt/misc
WORKDIR /opt/adtools
COPY scripts/compile-adtools.sh /compile-adtools.sh
RUN chmod +x /compile-adtools.sh && bash /compile-adtools.sh
##############################################################################
# Final Base environment image
FROM ubuntu:latest
LABEL maintainer="Georgios Sokianos <walkero@gmail.com>"
COPY --from=builder /opt/ppc-amigaos /opt/ppc-amigaos