added swarm-cli image
All checks were successful
CI / Build swarm-cli docker images (push) Successful in 17s
All checks were successful
CI / Build swarm-cli docker images (push) Successful in 17s
This commit is contained in:
14
swarm-cli/Dockerfile
Normal file
14
swarm-cli/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apk apk update
|
||||
RUN --mount=type=cache,target=/var/cache/apk apk add nodejs npm nushell curl
|
||||
RUN npm install --global @ethersphere/swarm-cli
|
||||
RUN addgroup -S ethswarm
|
||||
RUN adduser -D -S -h /var/lib/ethswarm -s /usr/bin/nu -G ethswarm ethswarm
|
||||
ADD --chown=ethswarm:ethswarm config.nu /var/lib/ethswarm/.config/nushell/config.nu
|
||||
|
||||
USER ethswarm
|
||||
WORKDIR /var/lib/ethswarm
|
||||
ENTRYPOINT ["/usr/bin/nu"]
|
||||
|
||||
|
40
swarm-cli/config.nu
Normal file
40
swarm-cli/config.nu
Normal file
@@ -0,0 +1,40 @@
|
||||
# config.nu
|
||||
#
|
||||
# Installed by:
|
||||
# version = "0.104.1"
|
||||
#
|
||||
# This file is used to override default Nushell settings, define
|
||||
# (or import) custom commands, or run any other startup tasks.
|
||||
# See https://www.nushell.sh/book/configuration.html
|
||||
#
|
||||
# This file is loaded after env.nu and before login.nu
|
||||
#
|
||||
# You can open this file in your default editor using:
|
||||
# config nu
|
||||
#
|
||||
# See `help config nu` for more options
|
||||
#
|
||||
# You can remove these comments if you want or leave
|
||||
# them for future reference.
|
||||
|
||||
use std/util "path add"
|
||||
|
||||
path add ($env.HOME | path join "bin")
|
||||
path add ($env.HOME | path join ".local/bin")
|
||||
path add ($env.HOME | path join ".cargo/bin")
|
||||
|
||||
$env.config.show_banner = false
|
||||
$env.config.history.max_size = 10000
|
||||
|
||||
$env.PROMPT_COMMAND = { ||
|
||||
let username = id -u -n
|
||||
let hostname = sys host | get hostname
|
||||
let current_dir = (pwd)
|
||||
|
||||
$"($username)@($hostname) ($current_dir)"
|
||||
}
|
||||
|
||||
def --env mkcd [p: string] {
|
||||
mkdir $p
|
||||
cd $p
|
||||
}
|
Reference in New Issue
Block a user