diff --git a/docker/Dockerfile b/docker/Dockerfile index d02e75e1..7a2f9449 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,9 +8,11 @@ WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN curl -fsSL https://bun.com/install | bash && \ - ~/.bun/bin/bun i --production && \ - ~/.bun/bin/bun add --no-save gritty && \ - ~/.bun/bin/bun pm cache rm + ln -s /root/.bun/bin/bun /usr/local/bin/bun && \ + chmod +x /usr/local/bin/bun && \ + bun i --production --no-save && \ + bun i gritty --production --no-save && \ + bun pm cache rm COPY . /usr/src/app @@ -19,7 +21,6 @@ WORKDIR / ENV cloudcmd_terminal=true ENV cloudcmd_terminal_path=gritty ENV cloudcmd_open=false -ENV PATH="/root/.bun/bin:$PATH" EXPOSE 8000 diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index b873c341..b4e5b306 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -9,17 +9,18 @@ COPY package.json /usr/src/app/ RUN apk update && \ apk add --no-cache curl bash make g++ python3 && \ - curl -fsSL https://bun.com/install | bash && \ - ~/.bun/bin/bun i --production --no-save && \ - PATH=$PATH:~/.bun/bin bun i gritty --no-save && \ - ~/.bun/bin/bun pm cache rm && \ + curl -fsSL https://bun.sh/install | bash && \ + ln -s ~/.bun/bin/bun /usr/local/bin/bun && \ + chmod +x /usr/local/bin/bun && \ + bun i --production --no-save && \ + bun i gritty --production --no-save && \ + bun pm cache rm && \ apk del make g++ python3 && \ rm -rf /usr/include /tmp/* /var/cache/apk/* COPY . /usr/src/app WORKDIR / - ENV cloudcmd_terminal true ENV cloudcmd_terminal_path gritty ENV cloudcmd_open false diff --git a/docker/Dockerfile.io b/docker/Dockerfile.io index 5ec8474f..d63f606e 100644 --- a/docker/Dockerfile.io +++ b/docker/Dockerfile.io @@ -8,13 +8,17 @@ WORKDIR /usr/src/app COPY package.json /usr/src/app/ RUN apt-get update && apt-get upgrade && apt-get autoremove && \ - apt-get install -y netcat-openbsd mc iputils-ping vim neovim && \ + apt-get install -y netcat-openbsd mc iputils-ping vim neovim sudo && \ npm i wisdom nupdate version-io redrun madrun redlint putout -g && \ - curl -fsSL https://bun.com/install | bash && \ + curl -fsSL https://bun.sh/install | bash && \ + ln -s ~/.bun/bin/bun /usr/local/bin/bun && \ + chmod +x /usr/local/bin/bun && \ curl -fsSL https://deno.land/install.sh | sh && \ - ~/.bun/bin/bun i --production && \ - ~/.bun/bin/bun add --no-save gritty && \ - ~/.bun/bin/bun pm cache rm && \ + ln -s ~/.deno/bin/deno /usr/local/bin/deno && \ + chmod +x /usr/local/bin/deno && \ + bun i --production && \ + bun i gritty --production && \ + bun pm cache rm && \ echo "ALL ALL=(ALL) NOPASSWD: /usr/bin/apt-get install *" > /etc/sudoers.d/apt-install && \ chmod 0440 /etc/sudoers.d/apt-install && \ echo "set editing-mode vi" >> /etc/inputrc && \ @@ -27,7 +31,7 @@ WORKDIR / ENV cloudcmd_terminal=true ENV cloudcmd_terminal_path=gritty ENV cloudcmd_open=false -ENV PATH="node_modules/.bin:~/.bun/bin:$PATH" +ENV PATH=node_modules/.bin:$PATH EXPOSE 8000 diff --git a/docker/Dockerfile.slim b/docker/Dockerfile.slim index becb28ab..fc397a28 100644 --- a/docker/Dockerfile.slim +++ b/docker/Dockerfile.slim @@ -8,8 +8,12 @@ COPY package.json /usr/src/app/ RUN apt-get update && \ apt-get install -y build-essential python3 libncurses5-dev pkg-config && \ apt-get install -y --no-install-recommends curl ca-certificates unzip && \ - curl -fsSL https://bun.com/install | bash && \ - ~/.bun/bin/bun i --production && \ + curl -fsSL https://bun.sh/install | bash && \ + ln -s ~/.bun/bin/bun /usr/local/bin/bun && \ + chmod +x /usr/local/bin/bun && \ + bun i --production --no-save && \ + bun i gritty --production --no-save && \ + ~/.bun/bin/bun i --production --no-save && \ ~/.bun/bin/bun add --no-save gritty && \ ~/.bun/bin/bun pm cache rm && \ rm -rf /var/lib/apt/lists/* diff --git a/package.json b/package.json index e1f72537..76b8931f 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,6 @@ }, "subdomain": "cloudcmd", "dependencies": { - "@babel/plugin-transform-optional-chaining": "^7.21.0", "@cloudcmd/dropbox": "^5.0.1", "@cloudcmd/fileop": "^9.0.7", "@cloudcmd/move-files": "^8.0.0", @@ -149,6 +148,7 @@ "yargs-parser": "^22.0.0" }, "devDependencies": { + "@babel/plugin-transform-optional-chaining": "^7.21.0", "@babel/code-frame": "^7.22.5", "@babel/core": "^7.22.5", "@babel/preset-env": "^7.0.0", @@ -178,7 +178,7 @@ "eslint-plugin-n": "^17.0.0-4", "eslint-plugin-putout": "^31.0.0", "globals": "^17.0.0", - "gritty": "^10.0.0", + "gritty": "^10.0.2", "gunzip-maybe": "^1.3.1", "html-webpack-plugin": "^5.6.3", "inherits": "^2.0.3",