Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install zsh on unbuntu for developing #111

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ ARG BUILD_FROM=public.ecr.aws/ubuntu/ubuntu:22.04
FROM ${BUILD_FROM}

ENV EMQX_BUILDER_IMAGE=${BUILD_FROM}
ENV ERL_AFLAGS="-kernel shell_history enabled"

ARG OTP_VERSION=26.2.3-1
ARG ELIXIR_VERSION=1.15.7
ARG FDB_VERSION=7.3.27
ARG EMQTT_BENCH_REF=0.4.17
ARG LUX_REF=lux-2.9.1

COPY get-otp.sh get-elixir.sh get-fdb.sh get-emqtt-bench.sh get-lux.sh /
COPY get-otp.sh get-zsh.sh get-elixir.sh get-fdb.sh get-emqtt-bench.sh get-lux.sh /

RUN /get-otp.sh ${OTP_VERSION} && \
/get-elixir.sh ${ELIXIR_VERSION} && \
RUN /get-zsh.sh && \
/get-otp.sh ${OTP_VERSION} && \
/get-elixir.sh ${ELIXIR_VERSION} && \
env FDB_VERSION=${FDB_VERSION} /get-fdb.sh && \
env EMQTT_BENCH_REF=${EMQTT_BENCH_REF} /get-emqtt-bench.sh && \
env LUX_REF=${LUX_REF} /get-lux.sh && \
rm /get-otp.sh /get-elixir.sh /get-fdb.sh /get-emqtt-bench.sh /get-lux.sh
rm /get-otp.sh /get-zsh.sh /get-elixir.sh /get-fdb.sh /get-emqtt-bench.sh /get-lux.sh

WORKDIR /
CMD [ "/bin/bash" ]
CMD [ "/bin/zsh" ]
31 changes: 31 additions & 0 deletions get-zsh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

set -euo pipefail

URL="https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh"

cd /
curl --silent --show-error -fkL "$URL" -o "zsh-in-docker.sh"
chmod +x zsh-in-docker.sh

## build

./zsh-in-docker.sh \
-t https://github.com/denysdovhan/spaceship-prompt \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-p git \
-p git-fast \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-history-substring-search \
-p https://github.com/zsh-users/zsh-syntax-highlighting \
-p 'history-substring-search' \
-a 'bindkey "\$terminfo[kcuu1]" history-substring-search-up' \
-a 'bindkey "\$terminfo[kcud1]" history-substring-search-down'


## cleanup
cd /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd /
cd ..

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty much the same in this case

rm -rf zsh-in-docker.sh

Loading