Skip to content

Commit 66cacda

Browse files
committed
feature: docker: io: add PREFIX
1 parent bec3f5a commit 66cacda

1 file changed

Lines changed: 25 additions & 12 deletions

File tree

docker/Dockerfile.io

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,44 @@ 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
1518

1619
ARG GO_VERSION=1.21.2
1720
ARG NVIM_VERSION=0.12.0
1821
ARG UBUNTU_DEPS="libatomic1 curl wget git net-tools iproute2"
22+
ARG RUST_DEPS="build-essential
23+
ARG HASKELL_DEPS="essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev pkg-config"
24+
ARG DEPS="less ffmpeg net-tools netcat-openbsd mc iputils-ping vim bat fzf locales sudo command-not-found ncdu aptitude htop btop hexyl"
1925
2026
RUN apt-get update && \
2127
apt-get upgrade -y && \
2228
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 && \
29+
apt-get install -y ${UBUNTU_DEPS} ${RUST_DEPES} ${HASKELL_DEPS} ${DEPS} && \
2430
echo "> Update command-not-found database. Run 'sudo apt update' to populate it." && \
2531
apt-get update && \
2632
apt-get autoremove && \
2733
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 && \
34+
echo "> create user"
35+
useradd -m -s /bin/bash -u 1337 -g 1337 instalador && \
36+
chown -R instalador /usr/local && \
37+
chown -R instalador /usr/local && \
38+
su instalador
39+
echo "> install bun" && \
40+
curl https://bun.sh/install | bash && \
41+
echo "> install npm globals" && \
42+
bun i palabra wisdom nupdate version-io redrun superc8 supertape madrun redlint putout renamify-cli runny redfork -g && \
43+
echo "> install rust go deno bun fasm nvim" && \
44+
bun ${BUN_INSTALL}/bin/palabra i nvm rust go deno fasm nvim haskell -d /usr/local/src && \
45+
echo "> install node" && \
46+
. $NVM_DIR/nvm.sh && \
3247
nvm i node && \
3348
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 && \
49+
echo "> remove user" && \
50+
exit && \
51+
userdel -r instalador && \
4052
echo "> install gritty" && \
4153
bun r gritty --omit dev && \
4254
bun i gritty --omit dev && \
@@ -72,6 +84,7 @@ ENV cloudcmd_terminal=true \
7284
cloudcmd_open=false \
7385
PATH=node_modules/.bin:$PATH \
7486
PATH=~/.local/bin:$PATH \
87+
PATH=/usr/local/src/bun/bin:$PATH \
7588
BUN_INSTALL_CACHE_DIR=/tmp/bun-cache \
7689
DENO_DIR=/tmp/deno-cache \
7790
LANG=en_US.UTF-8 \

0 commit comments

Comments
 (0)