|
1 | | -FROM ubuntu:latest |
| 1 | +FROM node:lts-slim |
2 | 2 |
|
3 | 3 | ENV DEBIAN_FRONTEND=noninteractive |
4 | | -ENV PATH=/usr/local/CodeFlare/bin:$PATH |
| 4 | +ENV KUI_HEADLESS=true |
| 5 | +ENV KUI_HEADLESS_WEBPACK=true |
| 6 | +ENV CODEFLARE_HEADLESS_HOME=/usr/local/CodeFlare |
5 | 7 |
|
6 | 8 | # TODO hard-coded arch |
7 | | -ADD dist/electron/CodeFlare-linux-x64 /usr/local/CodeFlare |
| 9 | +ADD dist/headless /usr/local/CodeFlare |
| 10 | +ADD store /usr/local/CodeFlare/store |
| 11 | +ADD bin/codeflare /usr/local/bin/codeflare |
8 | 12 |
|
9 | | -# Note, the `codeflare ...` commands are not strictly necessary. We do |
10 | | -# them here only to save some time installing these prereqs on every |
11 | | -# run. |
12 | | -RUN apt update && apt -y install python3 python3-pip \ |
| 13 | +RUN apt update && apt -y install python3 python3-pip sudo curl \ |
13 | 14 | && apt -y clean && rm -rf /var/lib/apt/lists/* \ |
14 | | - && codeflare util/jq \ |
15 | | - && codeflare util/websocat \ |
16 | | - && codeflare s3/install/cli \ |
17 | | - && codeflare ml/ray/install/cli \ |
18 | | - && codeflare kubernetes/kubectl \ |
19 | | - && codeflare kubernetes/helm3 \ |
| 15 | + && (cd /usr/bin && ln -s pip3 pip) \ |
20 | 16 | && adduser --disabled-password --gecos '' codeflare && adduser codeflare sudo && adduser root sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \ |
21 | | - && touch /home/codeflare/.codeflare |
| 17 | + && mkdir -p /root/.local/share/madwizard-nodejs/profiles \ |
| 18 | + && codeflare -n util/jq \ |
| 19 | + && codeflare -n util/websocat \ |
| 20 | + && codeflare -n s3/install/cli \ |
| 21 | + && codeflare -n ml/ray/install/cli \ |
| 22 | + && codeflare -n kubernetes/kubectl \ |
| 23 | + && codeflare -n kubernetes/helm3 |
22 | 24 |
|
23 | | -ENTRYPOINT ["codeflare"] |
24 | | -WORKDIR /home/codeflare |
25 | 25 | USER codeflare |
| 26 | +WORKDIR /home/codeflare |
26 | 27 |
|
27 | | - |
28 | | - |
| 28 | +# Note, the `codeflare ...` commands are not strictly necessary. We do |
| 29 | +# them here only to save some time installing these prereqs on every |
| 30 | +# run. |
29 | 31 |
|
30 | 32 | # in case we want to use the published production versions at some point... |
31 | 33 | #RUN export FILE=CodeFlare-linux-$([ "$(uname -m)" = "x86_64" ] && echo x64 || echo arm64) \ |
|
0 commit comments