Skip to content

Commit

Permalink
Remove commands to set VSCode as git editor (#65)
Browse files Browse the repository at this point in the history
The commands were failing, causing the devcontainer to fail to start.
The git editor is better set in the user's [dotfiles][1] ([example][2])

[1]: https://docs.github.com/en/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account
[2]: https://github.com/johnboyes/dotfiles/blob/master/.gitconfig
  • Loading branch information
johnboyes committed Dec 6, 2020
1 parent c8ac0ea commit cade05f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ARG VARIANT=buster
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}


ARG GIT_EDITOR_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/containers/codespaces-linux/.devcontainer/git-ed.sh"
ARG SHELLCHECK_VERSION="v0.7.1"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
Expand All @@ -18,15 +17,8 @@ RUN apt-get update \
&& mkdir -p /tmp/shellcheck \
&& wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJv -C /tmp/shellcheck/ \
&& install -m 755 /tmp/shellcheck/shellcheck-${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/shellcheck \
# Configure VSCode as the default editor for git commits
# Adapted from https://github.com/microsoft/vscode-dev-containers/blob/master/containers/codespaces-linux/.devcontainer/Dockerfile
&& mkdir -p /tmp/git-ed \
&& wget -qO /tmp/git-ed/git-ed.sh ${GIT_EDITOR_SCRIPT_SOURCE} \
&& install -m 755 /tmp/git-ed/git-ed.sh /usr/local/bin/git-ed.sh \
&& git config --global core.editor "/usr/local/bin/git-ed.sh" \
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/shellcheck \
&& rm -rf /tmp/git-ed

0 comments on commit cade05f

Please sign in to comment.