From a0467d37d319a3b2d0331644a7083d2dc5de6ec9 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 25 Mar 2017 14:16:21 +0100 Subject: [PATCH] Remove bash This requires to install ncurses explicitly, which was installed as a dep for bash before, and Vim requires it. Ref: https://github.com/tweekmonster/vim-testbed/issues/20#issuecomment-289196080 --- Dockerfile | 5 +---- scripts/argecho.sh | 2 +- scripts/install_vim.sh | 4 +++- scripts/run_vim.sh | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4693511..7235371 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,6 @@ FROM alpine:3.5 -RUN apk --update add bash \ - && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* - -RUN adduser -h /home -s /bin/bash -D -u 8465 vimtest +RUN adduser -h /home -s /bin/sh -D -u 8465 vimtest RUN mkdir -p /vim /vim-build/bin /plugins RUN chown vimtest:vimtest /home /plugins diff --git a/scripts/argecho.sh b/scripts/argecho.sh index 017e6a2..f7cf1d6 100644 --- a/scripts/argecho.sh +++ b/scripts/argecho.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh echo "Running as: $(whoami)" diff --git a/scripts/install_vim.sh b/scripts/install_vim.sh index df766b0..0c317f8 100644 --- a/scripts/install_vim.sh +++ b/scripts/install_vim.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e @@ -20,6 +20,8 @@ build() { [ -z $NAME ] && NAME="vim-${TAG}" [ -z $TAG ] && bail "-tag is required" + apk add ncurses + VIM_NAME="vim_${TAG}_py${PYTHON}_rb${RUBY}_lua${LUA}" VIM_PATH="/vim-build/$VIM_NAME" VIM_BIN="$VIM_PATH/bin/vim" diff --git a/scripts/run_vim.sh b/scripts/run_vim.sh index 2467cf2..e1d664a 100644 --- a/scripts/run_vim.sh +++ b/scripts/run_vim.sh @@ -1,10 +1,10 @@ -#!/bin/bash +#!/bin/sh BIN=$1 shift -if [ "$BIN" == "bash" ] || [ -z "$BIN" ]; then - exec /bin/bash +if [ "$BIN" = "sh" ] || [ -z "$BIN" ]; then + exec /bin/sh fi if ! [ -x "/vim-build/bin/$BIN" ]; then exec "$BIN" "$@"