Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
danet
quant
Commits
082f1981
Commit
082f1981
authored
1 year ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
Add devcontainer
parent
e27443e4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#170812
failed
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.devcontainer/Dockerfile
+34
-0
34 additions, 0 deletions
.devcontainer/Dockerfile
.devcontainer/devcontainer.json
+39
-0
39 additions, 0 deletions
.devcontainer/devcontainer.json
.gitignore
+0
-1
0 additions, 1 deletion
.gitignore
with
73 additions
and
1 deletion
.devcontainer/Dockerfile
0 → 100644
+
34
−
0
View file @
082f1981
# The devcontainer will be based on debian
# The base container already has entrypoint, vscode user account, etc. out of the box
FROM
mcr.microsoft.com/vscode/devcontainers/base:bullseye
# Set permissions for mounts in devcontainer.json
RUN
mkdir
-p
/home/vscode/.vscode-server/bin
RUN
chown
-R
vscode:vscode /home/vscode/.vscode-server
# Update and install some basic tools inside the container
# Adjust this list based on your demands
RUN
apt-get update
\
&&
apt-get upgrade
-y
\
&&
apt-get
install
-y
--no-install-recommends
\
sshpass
\
curl
\
iputils-ping
\
htop
\
zsh
\
nano
\
vim
\
tmux
\
nload
\
yamllint
\
&&
rm
-rf
/var/lib/apt/lists/
*
\
&&
rm
-Rf
/usr/share/doc
&&
rm
-Rf
/usr/share/man
\
&&
apt-get clean
# Install oh-my-zsh for more terminal features and set is as primary shell
ENV
SHELL /bin/zsh
RUN
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
-O
- | zsh
||
true
# Set editor
RUN
echo
"export VISUAL='nano'"
>>
/home/vscode/.zshrc
RUN
echo
"export EDITOR='nano'"
>>
/home/vscode/.zshrc
This diff is collapsed.
Click to expand it.
.devcontainer/devcontainer.json
0 → 100644
+
39
−
0
View file @
082f1981
//
For
format
details,
see
https://aka.ms/devcontainer.json.
For
config
options,
see
the
//
README
at:
https://github.com/devcontainers/templates/tree/main/src/python
{
"name"
:
"ekms-develop-go"
,
"build"
:
{
"dockerfile"
:
"Dockerfile"
},
"features"
:
{
"ghcr.io/devcontainers/features/go:1"
:
{
"version"
:
"1.21"
},
"ghcr.io/devcontainers/features/docker-in-docker:2.7"
:
{
"version"
:
"latest"
}
},
//
add
any
required
extensions
that
must
be
pre-installed
in
the
devcontainer
"customizations"
:
{
"vscode"
:
{
"extensions"
:
[
"golang.go"
,
"ms-azuretools.vscode-docker"
,
"EditorConfig.EditorConfig"
,
"eamodio.gitlens"
,
"ms-vscode.makefile-tools"
,
"redhat.vscode-yaml"
,
"valentjn.vscode-ltex"
]
}
},
"mounts"
:
[
//
Source:
https://github.com/microsoft/vscode-remote-release/issues/
5823
//
Creates
a
named
volume
mounted
to
/home/vscode.
Survives
a
rebuild.
//
Creates
a
named
volume
mounted
to
/root/.docker.
Survives
a
rebuild.
//
Creates
an
anonymous
volume
mounted
to
/home/vscode/.vscode-server.
Gets
destroyed
on
rebuild
,
which
allows
vscode
to
reinstall
the
extensions
and
dotfiles.
"source=ekms-vscode-home-dir,target=/home/vscode,type=volume"
,
"source=ekms-docker-root-config,target=/root/.docker,type=volume"
,
"target=/home/vscode/.vscode-server,type=volume"
]
}
This diff is collapsed.
Click to expand it.
.gitignore
+
0
−
1
View file @
082f1981
...
@@ -6,7 +6,6 @@ artifacts/
...
@@ -6,7 +6,6 @@ artifacts/
gostructs.go
gostructs.go
# non vimmers
# non vimmers
.devcontainer/
.vscode/
.vscode/
.idea/
.idea/
...
...
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