2022-07-09 13:27:35 -04:00
|
|
|
FROM casjaysdevdocker/bash:latest as build
|
2022-07-06 07:07:00 -04:00
|
|
|
|
|
|
|
RUN apk --no-cache add --update \
|
2022-07-06 07:15:11 -04:00
|
|
|
vim && \
|
2022-10-07 18:48:31 -04:00
|
|
|
mkdir -p /root/.vim/autoload /root/.vim/bundle
|
2022-07-06 07:07:00 -04:00
|
|
|
|
|
|
|
COPY ./config/vimrc /config/.vimrc
|
|
|
|
COPY ./bin/. /usr/local/bin/
|
|
|
|
|
2022-07-06 07:15:11 -04:00
|
|
|
RUN curl -q -LSsf -o ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && \
|
2022-07-06 07:07:00 -04:00
|
|
|
vim -u "/config/.vimrc" -c ":BundleInstall" +qall </dev/null &>/dev/null && \
|
|
|
|
vim -u "/config/.vimrc" -c ":PluginInstall" +qall </dev/null &>/dev/null && \
|
2022-07-06 07:39:30 -04:00
|
|
|
vim -u "/config/.vimrc" -c ":PluginClean" +qall </dev/null &>/dev/null
|
2022-07-06 07:07:00 -04:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
2022-10-07 18:48:31 -04:00
|
|
|
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
|
2022-07-06 07:07:00 -04:00
|
|
|
|
|
|
|
LABEL \
|
|
|
|
org.label-schema.name="vim" \
|
|
|
|
org.label-schema.description="vim text editor" \
|
2022-07-09 13:27:35 -04:00
|
|
|
org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/vim" \
|
|
|
|
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/vim" \
|
2022-07-06 07:07:00 -04:00
|
|
|
org.label-schema.build-date=$BUILD_DATE \
|
|
|
|
org.label-schema.version=$BUILD_DATE \
|
|
|
|
org.label-schema.vcs-ref=$BUILD_DATE \
|
2022-07-09 13:27:35 -04:00
|
|
|
org.label-schema.license="WTFPL" \
|
2022-07-06 07:07:00 -04:00
|
|
|
org.label-schema.vcs-type="Git" \
|
|
|
|
org.label-schema.schema-version="latest" \
|
|
|
|
org.label-schema.vendor="CasjaysDev" \
|
2022-10-07 18:48:31 -04:00
|
|
|
maintainer="CasjaysDev <docker-admin@casjaysdev.com>"
|
2022-07-06 07:07:00 -04:00
|
|
|
|
|
|
|
ENV VIM_INDENT="2" \
|
|
|
|
VIMRC="/root/.vimrc" \
|
|
|
|
SHELL="/bin/bash" \
|
|
|
|
TERM="xterm-256color" \
|
|
|
|
HOSTNAME="casjaysdev-vim" \
|
|
|
|
TZ="${TZ:-America/New_York}"
|
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
VOLUME ["/root","/config"]
|
|
|
|
|
|
|
|
COPY --from=build /. /
|
|
|
|
|
2022-10-07 18:48:31 -04:00
|
|
|
HEALTHCHECK --interval=15s --timeout=3s CMD [ "/usr/local/bin/entrypoint-vim.sh", "healthcheck" ]
|
2022-07-06 07:07:00 -04:00
|
|
|
ENTRYPOINT [ "/usr/local/bin/entrypoint-vim.sh" ]
|
|
|
|
CMD [ "/usr/bin/tmux" ]
|