Skip to content

Commit 6858de3

Browse files
committed
feature: docker: io: add PREFIX
1 parent bec3f5a commit 6858de3

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

docker/Dockerfile.io

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,45 @@ COPY package.json /usr/src/cloudcmd/
1111

1212
ENV DEBIAN_FRONTEND=noninteractive \
1313
NVM_DIR=/usr/local/src/nvm \
14-
npm_config_cache=/tmp/npm-cache
14+
PREFIX=/usr/local \
15+
npm_config_cache=/tmp/npm-cache \
16+
PATH=/usr/local/src/bun/bin:$PATH \
17+
BUN_INSTALL=/usr/local/src/bun \
18+
NPM_CONFIG_CACHE=/tmp/.npm
1519

1620
ARG GO_VERSION=1.21.2
1721
ARG NVIM_VERSION=0.12.0
1822
ARG UBUNTU_DEPS="libatomic1 curl wget git net-tools iproute2"
23+
ARG RUST_DEPS="build-essential
24+
ARG HASKELL_DEPS="essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev pkg-config"
25+
ARG DEPS="less ffmpeg net-tools netcat-openbsd mc iputils-ping vim bat fzf locales sudo command-not-found ncdu aptitude htop btop hexyl"
1926
2027
RUN apt-get update && \
2128
apt-get upgrade -y && \
2229
apt-get autoremove && \
23-
apt-get install -y ${UBUNTU_DEPS} less ffmpeg net-tools netcat-openbsd mc iputils-ping vim bat fzf locales sudo command-not-found ncdu aptitude htop btop hexyl && \
30+
apt-get install -y ${UBUNTU_DEPS} ${RUST_DEPES} ${HASKELL_DEPS} ${DEPS} && \
2431
echo "> Update command-not-found database. Run 'sudo apt update' to populate it." && \
2532
apt-get update && \
2633
apt-get autoremove && \
2734
apt-get clean && \
28-
echo "> install nvm" && \
29-
mkdir $NVM_DIR && \
30-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash && \
31-
. ${NVM_DIR}/nvm.sh && \
35+
echo "> create user" && \
36+
useradd -m -s /bin/bash -u 1337 -g 1337 instalador && \
37+
chown -R instalador /usr/local && \
38+
chown -R instalador /usr/local && \
39+
su instalador
40+
echo "> install bun" && \
41+
curl https://bun.sh/install | bash && \
42+
echo "> install npm globals" && \
43+
bun i palabra wisdom nupdate version-io redrun superc8 supertape madrun redlint putout renamify-cli runny redfork -g && \
44+
echo "> install rust go deno bun fasm nvim" && \
45+
bun ${BUN_INSTALL}/bin/palabra i nvm rust go deno fasm nvim haskell -d /usr/local/src && \
46+
echo "> install node" && \
47+
. $NVM_DIR/nvm.sh && \
3248
nvm i node && \
3349
ln -fs /${NVM_DIR}/versions/node/$(node -v)/bin/node /usr/local/bin/node && \
34-
echo "> install palabra" && \
35-
npm i palabra -g && \
36-
echo "> install rust go deno bun fasm nvim" && \
37-
palabra i rust go deno bun fasm nvim -d /usr/local/src && \
38-
echo "> install npm globals" && \
39-
bun i wisdom nupdate version-io redrun superc8 supertape madrun redlint putout renamify-cli runny redfork -g && \
50+
echo "> remove user" && \
51+
exit && \
52+
userdel -r instalador && \
4053
echo "> install gritty" && \
4154
bun r gritty --omit dev && \
4255
bun i gritty --omit dev && \
@@ -72,6 +85,7 @@ ENV cloudcmd_terminal=true \
7285
cloudcmd_open=false \
7386
PATH=node_modules/.bin:$PATH \
7487
PATH=~/.local/bin:$PATH \
88+
PATH=/usr/local/src/bun/bin:$PATH \
7589
BUN_INSTALL_CACHE_DIR=/tmp/bun-cache \
7690
DENO_DIR=/tmp/deno-cache \
7791
LANG=en_US.UTF-8 \

0 commit comments

Comments
 (0)