Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-code-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MyDockerImages
docker-code-server
Commits
b57d3abd
Unverified
Commit
b57d3abd
authored
2 years ago
by
Dominique Marcadet
Browse files
Options
Downloads
Patches
Plain Diff
try to make changes, but even the version downloaded around 13/06/2021 cannot be built
parent
6dc54a74
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+37
-5
37 additions, 5 deletions
Dockerfile
wrapper_script.sh
+32
-0
32 additions, 0 deletions
wrapper_script.sh
with
69 additions
and
5 deletions
Dockerfile
+
37
−
5
View file @
b57d3abd
FROM
ghcr.io/linuxserver/baseimage-ubuntu:bionic
# set version label
ARG
BUILD_DATE
ARG
VERSION
ARG
CODE_RELEASE
LABEL
build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL
maintainer="aptalca"
# environment settings
ENV
HOME="/config"
...
...
@@ -63,5 +58,42 @@ RUN \
# add local files
COPY
/root /
# Install on-my-zsh
RUN
chsh
--shell
/bin/zsh abc
&&
\
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \
git clone --branch master --single-branch --depth 1 \
"https://github.com/zsh-users/zsh-autosuggestions.git" \
/config/.oh-my-zsh/plugins/zsh-autosuggestions && \
echo "source /config/.oh-my-zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" \
>> /config/.zshrc && \
git clone --branch master --single-branch --depth 1 \
"https://github.com/zsh-users/zsh-syntax-highlighting.git" \
/config/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting && \
sed -i 's/plugins=(.*/plugins=(git vscode)/' /config/.zshrc && \
echo 'PS1="%B%F{blue}%~:%f%b "' >>/config/.zshrc
# The SSH key pair is stored in /config
RUN
mkdir
/root/.ssh
&&
\
echo
"Host gitlab-student.centralesupelec.fr "
>
/root/.ssh/config
&&
\
echo
" PreferredAuthentications publickey"
>>
/root/.ssh/config
&&
\
echo
" IdentityFile /config/.ssh/id_ed25519"
>>
/root/.ssh/config
&&
\
mkdir
/config/.ssh
# VSCode extension for Python
RUN
/usr/local/bin/code-server
--install-extension
ms-python.python
# /config will be a docker volume, initially empty
# wrapper_script will do the copy from /init-config
RUN
chown
-R
abc:abc /config
&&
\
mv
/config /init-config
&&
\
mkdir
-p
/config/workspace
&&
\
chown
-R
abc:abc /config
# Will be entry point
COPY
wrapper_script.sh /usr/local/lib/wrapper_script.sh
# launch
ENTRYPOINT
["/bin/bash", "/usr/local/lib/wrapper_script.sh"]
# ports and volumes
EXPOSE
8443
This diff is collapsed.
Click to expand it.
wrapper_script.sh
0 → 100755
+
32
−
0
View file @
b57d3abd
#!/bin/bash
if
[
-z
$2
]
;
then
AUTH
=
"none"
else
AUTH
=
"password"
fi
cp
-Rn
/init-config/.oh-my-zsh /config/
cp
-Rn
/init-config/.openvscode-server /config/
cp
-Rn
/init-config/.zshrc /config/
mkdir
/config/workspace
chown
-R
abc:abc /config
# Environment
export
TZ
=
Europe/Paris
export
SUDO_PASSWORD
=
abc
# Not executed ?
/usr/bin/bash /etc/cont-init.d/30-config
cd
/app/openvscode-server
||
exit
exec
\
s6-setuidgid abc
\
/usr/local/bin/code-server
\
--bind-addr
0.0.0.0:8443
\
--user-data-dir
/config/data
\
--extensions-dir
/config/extensions
\
--disable-telemetry
\
--auth
"
${
AUTH
}
"
\
/config/workspace
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment