Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit 1bb64e5

Browse files
committed
PR feedback - fix Dockerfile run commands and runner bash exec
1 parent 178bcde commit 1bb64e5

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

.sail/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@ LABEL project_root "~/go/src/go.coder.com"
1414
RUN wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.55.4/hugo_extended_0.55.4_Linux-64bit.deb && \
1515
sudo dpkg -i /tmp/hugo.deb && \
1616
rm -f /tmp/hugo.deb
17-
18-
# Fails to install Extension 'ms-azuretools.vscode-docker' not found.
19-
# error vscode undefined
20-
# RUN installext ms-azuretools.vscode-docker

images/base/Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ ENV LC_ALL=en_US.UTF-8
2424
# anyways, but it's nice to have this during the build pipepline so we can
2525
# install extensions.
2626

27-
# Download and Install code-server: https://github.com/cdr/code-server/releases/tag/3.0.0
28-
29-
RUN wget -O code-server.tgz "https://codesrv-ci.cdr.sh/releases/3.0.1/linux-x86_64.tar.gz"; \
30-
tar -C /usr/lib -xzf code-server.tgz; \
31-
rm code-server.tgz;
32-
33-
RUN ln -s /usr/lib/code-server-3.0.1-linux-x86_64/code-server /usr/bin/code-server; \
34-
chmod +x /usr/lib/code-server-3.0.1-linux-x86_64/code-server; \
35-
chmod +x /usr/bin/code-server;
27+
RUN wget -O code-server.tgz "https://codesrv-ci.cdr.sh/releases/3.0.1/linux-x86_64.tar.gz" && \
28+
tar -C /usr/lib -xzf code-server.tgz && \
29+
rm code-server.tgz && \
30+
ln -s /usr/lib/code-server-3.0.1-linux-x86_64/code-server /usr/bin/code-server && \
31+
chmod +x /usr/lib/code-server-3.0.1-linux-x86_64/code-server && \
32+
chmod +x /usr/bin/code-server
3633

3734
ADD installext /usr/bin/installext

runner.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ func (r *runner) constructCommand(projectDir string) string {
165165
//
166166
// We start code-server such that extensions installed through the UI are placed in the host's extension dir.
167167
cmd := fmt.Sprintf(`set -euxo pipefail || exit 1
168-
cd %v
169-
# This is necessary in case the .vscode directory wasn't created inside the container, as mounting to the host
170-
# extension dir will create it as root.
171-
sudo chown user:user ~/.vscode
172-
/usr/bin/code-server --host %v --port %v --user-data-dir ~/.config/Code --extensions-dir %v --extra-extensions-dir ~/.vscode/extensions --auth=none \
173-
--allow-http 2>&1 | tee %v
174-
`, projectDir, containerAddr, containerPort, hostExtensionsDir, containerLogPath)
168+
cd %v
169+
# This is necessary in case the .vscode directory wasn't created inside the container, as mounting to the host
170+
# extension dir will create it as root.
171+
sudo chown user:user ~/.vscode
172+
/usr/bin/code-server --host %v --port %v --user-data-dir ~/.config/Code --extensions-dir %v --extra-extensions-dir ~/.vscode/extensions --auth=none \
173+
--allow-http 2>&1 | tee %v`,
174+
projectDir, containerAddr, containerPort, hostExtensionsDir, containerLogPath)
175175

176176
if r.testCmd != "" {
177177
cmd = r.testCmd + "\n exit 1"

0 commit comments

Comments
 (0)