-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
99 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
ignored: | ||
- SC1090 | ||
- SC1091 | ||
- DL3018 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
version: 0.1 | ||
cli: | ||
version: 1.17.1 | ||
version: 1.17.2 | ||
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v1.2.6 | ||
ref: v1.3.0 | ||
uri: https://github.com/trunk-io/plugins | ||
lint: | ||
disabled: | ||
- checkov | ||
- terrascan | ||
- yamllint | ||
- trivy | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- git-diff-check | ||
- [email protected].0 | ||
- [email protected].1 | ||
- [email protected] | ||
- [email protected] | ||
- prettier@3.0.3 | ||
- prettier@3.1.0 | ||
- [email protected] | ||
- [email protected] | ||
runtimes: | ||
enabled: | ||
- [email protected] | ||
- node@18.12.1 | ||
- [email protected].8 | ||
- node@20.10.0 | ||
- [email protected].9 | ||
actions: | ||
enabled: | ||
- trunk-announce | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,53 @@ | ||
ARG VERSION=latest | ||
FROM alpine:${VERSION} | ||
ARG VERSION=edge | ||
FROM alpine:$VERSION | ||
LABEL maintainer="<%= Z-Shell Community %>" | ||
LABEL email="<%= [email protected] =%>" | ||
|
||
ARG HOSTNAME=zi@docker | ||
ARG ZUSER=z-user | ||
ARG SHELL=/bin/zsh | ||
ARG DIR=/static | ||
|
||
ENV ZUSER=${ZUSER} | ||
ENV PUID=${PUID} | ||
ENV PGID=${PGID} | ||
ENV HOSTNAME=${HOSTNAME} | ||
ENV APK_ADD=${APK_ADD} | ||
ENV DIR=${DIR} TERM=${TERM} | ||
ENV ZI_ZSH_VERSION=${ZI_ZSH_VERSION} | ||
ENV ZI_HOME_DIR=${ZI_HOME_DIR} ZI_BIN_DIR=${ZI_BIN_DIR} | ||
|
||
# trunk-ignore(hadolint/DL3018) | ||
RUN apk --no-cache --virtual base add coreutils curl \ | ||
jq git libuser rsync sudo zsh ncurses-dev pcre-dev zlib-dev alpine-zsh-config \ | ||
&& apk --no-cache --virtual zsh-build-tools add autoconf bash build-base go vim | ||
ARG DIR | ||
ARG PUID | ||
ARG PGID | ||
ARG TERM | ||
ARG ZUSER | ||
ARG ZHOST | ||
|
||
ENV DIR=${DIR:-/static} | ||
ENV PUID=${PUID:-1000} | ||
ENV PGID=${PGID:-1000} | ||
ENV TERM=${TERM:-xterm} | ||
ENV ZUSER=${ZUSER:-user} | ||
ENV HOST=$ZHOST | ||
|
||
RUN set -ex && apk --no-cache add \ | ||
alpine-zsh-config \ | ||
ncurses-dev \ | ||
build-base \ | ||
coreutils \ | ||
pcre-dev \ | ||
zlib-dev \ | ||
autoconf \ | ||
libuser \ | ||
rsync \ | ||
bash \ | ||
curl \ | ||
sudo \ | ||
zsh \ | ||
git \ | ||
vim \ | ||
go \ | ||
jq | ||
|
||
WORKDIR $DIR | ||
COPY . . | ||
RUN chmod +x entrypoint.sh && ./entrypoint.sh | ||
|
||
VOLUME ["/src", "/data"] | ||
COPY --chown=${ZUSER} . /src | ||
COPY --chown=$ZUSER . /src | ||
|
||
USER ${ZUSER} | ||
WORKDIR /home/${ZUSER} | ||
USER $ZUSER | ||
WORKDIR /home/$ZUSER | ||
|
||
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh)" -- -i skip | ||
RUN /tmp/install.sh -i skip | ||
|
||
CMD ["/bin/zsh", "-l"] | ||
SHELL ["/bin/zsh", "-lc", "@zi-scheduler burst"] | ||
|
||
CMD ["zsh", "-il"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- | ||
# vim: ft=zsh sw=2 ts=2 et | ||
|
||
# Prepare and initiate the source tree. | ||
source /src/utils.zsh | ||
zi::prepare; zi::install | ||
|
||
typeset -U path module_path | ||
path=("${ZPFX:-${HOME}/.zi/polaris}/bin" "${HOME}/go/bin" $path) | ||
module_path+=( /data/zmodules/zpmod/Src ); zmodload zi/zpmod &>/dev/null | ||
|
||
zi::init | ||
prepare_system; initiate_system | ||
|
||
# If the ZI_ZSH_VERSION is set will install the specified version of Zsh with Zi. | ||
if [[ -n "$ZI_ZSH_VERSION" ]]; then | ||
if [[ "$ZI_ZSH_VERSION" != "$ZSH_VERSION" ]]; then | ||
zi::pack-zsh "$ZI_ZSH_VERSION" | ||
fi | ||
fi | ||
|
||
autoload -Uz _zi | ||
(( ${+_comps} )) && _comps[zi]=_zi |