Skip to content

Commit

Permalink
separate konductor base and code-server image dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat authored Dec 10, 2023
1 parent 3d5a598 commit 225ef94
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 91 deletions.
21 changes: 20 additions & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
"customizations": {
"vscode": {
"settings": [
"vim.easymotion", true,
"vim.incsearch", true,
"vim.useSystemClipboard", true,
"vim.useCtrlKeys", true,
"vim.hlsearch", true,
"keyboard.dispatch", "keyCode",
"vim.insertModeKeyBindings", [
{
"before": ["j", "j"],
"after": ["<Esc>"]
}
],
"vim.leader", "<space>",
"vim.handleKeys", {
"<C-a>": false,
"<C-f>": false
},
"extensions.experimental.affinity", {
"vscodevim.vim": 1
},
"go.testTags", "all",
"go.buildTags", "all",
"editor.minimap.enabled", false,
Expand Down Expand Up @@ -63,4 +83,3 @@
"forwardPorts": [1313, 2222, 6000, 7681, 8080],
"runArgs": ["--network=host"]
}

82 changes: 0 additions & 82 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -434,88 +434,6 @@ RUN set -ex \
&& /bin/ttyd --version \
&& true
## Install screenfetch
#RUN set -ex \
# && export varUrlScreenfetch="https://git.io/vaHfR" \
# && sudo curl --output /usr/bin/screenfetch -L ${varUrlScreenfetch} \
# && sudo chmod +x /usr/bin/screenfetch \
# && /usr/bin/screenfetch \
# && true
#################################################################################
# VSCode Server Configuration
#################################################################################
## Install VSCode Service
#EXPOSE 8080
#RUN set -ex \
# && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "aarch64") print "arm64"; else print "unknown" }') \
# && export varVerCode=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | awk -F '["v,]' '/tag_name/{print $5}') \
# && curl --output /tmp/code-server.deb -L "https://github.com/coder/code-server/releases/download/v${varVerCode}/code-server_${varVerCode}_${arch}.deb" \
# && sudo apt-get update \
# && sudo apt-get install -y /tmp/code-server.deb \
# && sudo apt-get clean \
# && sudo apt-get autoremove -y \
# && sudo apt-get purge -y --auto-remove \
# && sudo rm -rf \
# /var/lib/{apt,dpkg,cache,log} \
# /usr/share/{doc,man,locale} \
# /var/cache/apt \
# /root/.cache \
# /var/tmp/* \
# /tmp/* \
# && true
### Install VSCode Extension Plugins
#ARG CODE_PKGS="\
#golang.go \
#github.copilot \
#ms-python.python \
#redhat.vscode-yaml \
#esbenp.prettier-vscode \
#oderwat.indent-rainbow \
#ms-vscode.makefile-tools \
#mtunique.vim-fcitx-remote \
#ms-azuretools.vscode-docker \
#zhuangtongfa.Material-theme \
#github.vscode-pull-request-github \
#ms-vscode-remote.remote-containers \
#visualstudioexptteam.vscodeintellicode \
#bierner.markdown-preview-github-styles \
#ms-kubernetes-tools.vscode-kubernetes-tools \
#"
#vscodevim.vim \
#RUN set -ex \
# && for pkg in ${CODE_PKGS}; do code-server --install-extension ${pkg}; echo "Installed: ${pkg}"; done \
# && true
## Install OpenSSH Server
#EXPOSE 2222
#ARG APT_PKGS="\
#openssh-server \
#"
#RUN set -ex \
# && sudo apt-get update \
# && TERM=linux DEBIAN_FRONTEND=noninteractive \
# sudo apt-get install \
# --yes -q \
# --force-yes \
# -o Dpkg::Options::="--force-confdef" \
# -o Dpkg::Options::="--force-confold" \
# ${APT_PKGS} \
# && sudo apt-get clean \
# && sudo apt-get autoremove -y \
# && sudo apt-get purge -y --auto-remove \
# && sudo rm -rf \
# /var/lib/{apt,dpkg,cache,log} \
# /usr/share/{doc,man,locale} \
# /var/cache/apt \
# /root/.cache \
# /var/tmp/* \
# /tmp/* \
# && true
#################################################################################
# Load startup artifacts
COPY ./bin/code.entrypoint /bin/
Expand Down
73 changes: 73 additions & 0 deletions Dockerfile.code-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
###############################################################################
# Add VSCode code-server to the Konductor Container Image
###############################################################################
# Base Konductor Image
FROM ghcr.io/containercraft/konductor:latest

# Install VSCode Service
EXPOSE 8080
RUN set -ex \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "aarch64") print "arm64"; else print "unknown" }') \
&& export varVerCode=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | awk -F '["v,]' '/tag_name/{print $5}') \
&& curl --output /tmp/code-server.deb -L "https://github.com/coder/code-server/releases/download/v${varVerCode}/code-server_${varVerCode}_${arch}.deb" \
&& sudo apt-get update \
&& sudo apt-get install -y /tmp/code-server.deb \
&& sudo apt-get clean \
&& sudo apt-get autoremove -y \
&& sudo apt-get purge -y --auto-remove \
&& sudo rm -rf \
/var/lib/{apt,dpkg,cache,log} \
/usr/share/{doc,man,locale} \
/var/cache/apt \
/root/.cache \
/var/tmp/* \
/tmp/* \
&& true

# Install VSCode Extension Plugins
ARG CODE_PKGS="\
golang.go \
vscodevim.vim \
github.copilot \
ms-python.python \
redhat.vscode-yaml \
esbenp.prettier-vscode \
oderwat.indent-rainbow \
ms-vscode.makefile-tools \
ms-azuretools.vscode-docker \
zhuangtongfa.Material-theme \
github.vscode-pull-request-github \
ms-vscode-remote.remote-containers \
visualstudioexptteam.vscodeintellicode \
bierner.markdown-preview-github-styles \
ms-kubernetes-tools.vscode-kubernetes-tools \
"
RUN set -ex \
&& for pkg in ${CODE_PKGS}; do code-server --install-extension ${pkg}; echo "Installed: ${pkg}"; done \
&& true

# Install OpenSSH Server
EXPOSE 2222
ARG APT_PKGS="\
openssh-server \
"
RUN set -ex \
&& sudo apt-get update \
&& TERM=linux DEBIAN_FRONTEND=noninteractive \
sudo apt-get install \
--yes -q \
--force-yes \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
${APT_PKGS} \
&& sudo apt-get clean \
&& sudo apt-get autoremove -y \
&& sudo apt-get purge -y --auto-remove \
&& sudo rm -rf \
/var/lib/{apt,dpkg,cache,log} \
/usr/share/{doc,man,locale} \
/var/cache/apt \
/root/.cache \
/var/tmp/* \
/tmp/* \
&& true
8 changes: 0 additions & 8 deletions hack/Dockerfile.2

This file was deleted.

0 comments on commit 225ef94

Please sign in to comment.