MilesCranmer commited on
Commit
a7f014a
·
1 Parent(s): 371f013

Fix docker buildx issue

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -8
Dockerfile CHANGED
@@ -13,16 +13,34 @@ LABEL org.opencontainers.image.licenses = "Apache License 2.0"
13
  # Need to use ARG after FROM, otherwise it won't get passed through.
14
  ARG JLVERSION=1.8.2
15
 
16
- RUN apt-get update && apt-get install -y expect && apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  # Install juliaup:
19
- RUN curl -fsSL https://install.julialang.org -o /tmp/install-julia.sh && \
20
- echo '#!/usr/bin/expect\nspawn /tmp/install-julia.sh\nexpect "Cancel installation"\nsend -- "\\r"\nexpect eof' >> /tmp/install-julia.exp && \
21
- chmod +x /tmp/install-julia.sh && \
22
- chmod +x /tmp/install-julia.exp && \
23
- /tmp/install-julia.exp && \
24
- rm /tmp/install-julia.sh && \
25
- rm /tmp/install-julia.exp
 
 
 
 
 
26
 
27
  ENV JULIAUP_ROOT /root/.julia/juliaup
28
  ENV PATH "${JULIAUP_ROOT}/bin:${PATH}"
 
13
  # Need to use ARG after FROM, otherwise it won't get passed through.
14
  ARG JLVERSION=1.8.2
15
 
16
+ RUN apt-get update && apt-get install -yq \
17
+ expect \
18
+ build-essential \
19
+ curl \
20
+ git \
21
+ libssl-dev \
22
+ libffi-dev \
23
+ libxml2 \
24
+ libxml2-dev \
25
+ libxslt1.1 \
26
+ libxslt-dev \
27
+ libz-dev \
28
+ nano \
29
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
30
 
31
  # Install juliaup:
32
+ RUN curl -fsSL https://install.julialang.org -o install-julia.sh && \
33
+ # Fix for docker buildx https://github.com/rust-lang/rustup/issues/2700
34
+ sed -i 's#/proc/self/exe#$(which head)#g' install-julia.sh && \
35
+ sed -i 's#/proc/cpuinfo#/proc/cpuinfo 2> /dev/null || echo ''#g' install-julia.sh && \
36
+ sed -i 's#get_architecture || return 1#RETVAL=$(gcc -dumpmachine | sed "s/-/-unknown-/") #g' install-julia.sh && \
37
+ # Fix for non-interactivity https://github.com/JuliaLang/juliaup/issues/253
38
+ echo '#!/usr/bin/expect\nspawn ./install-julia.sh\nexpect "Cancel installation"\nsend -- "\\r"\nexpect eof' >> install-julia.exp && \
39
+ chmod +x install-julia.sh && \
40
+ chmod +x install-julia.exp && \
41
+ ./install-julia.exp && \
42
+ rm install-julia.sh && \
43
+ rm install-julia.exp
44
 
45
  ENV JULIAUP_ROOT /root/.julia/juliaup
46
  ENV PATH "${JULIAUP_ROOT}/bin:${PATH}"