Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
34 changes: 34 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG VARIANT
ARG MICROSOFT_BASE_IMAGE

FROM ${MICROSOFT_BASE_IMAGE} AS base_image
FROM retypeapp/retype:${VARIANT}

ENV DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US \
LC_ALL=C

RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
less \
vim \
locales \
bash-completion \
openssh-client \
&& \
apt-get clean \
&& \
locale-gen --purge en_US.UTF-8 \
&& \
groupadd -rg 1000 vscode && \
useradd -rms /bin/bash -u 1000 -g vscode vscode && \
chown -R vscode:vscode /usr/bin/retype

USER vscode
WORKDIR /home/vscode

# Copy Microsoft's .bashrc from their devcontainer base image,
# making the terminal look like an official one
COPY --chown=vscode:vscode --from=base_image /home/vscode/.bashrc /home/vscode/.bashrc
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "retype",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "2.4.0-ubuntu-amd64",
"MICROSOFT_BASE_IMAGE": "mcr.microsoft.com/vscode/devcontainers/base:debian-11"
}
},

"mounts": [
"source=${localEnv:HOME}/.bash_history,target=/home/vscode/.bash_history,type=bind,consistency=cached",
"source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
"source=/etc/resolv.conf,target=/etc/resolv.conf,type=bind,consistency=cached"
],

"containerEnv": {
"EDITOR": "vim",
"GIT_EDITOR": "vim"
},

"forwardPorts": [5000],
"remoteUser": "vscode"
}