Skip to content

Commit 107a51d

Browse files
committed
Add gitpod configuration
1 parent 5bcb358 commit 107a51d

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.gitpod.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
image:
3+
file: Dockerfile
4+
5+
tasks:
6+
- name: Build the documentation and serve the html
7+
before: daps -d DC-opensuse-all html
8+
command: python3.9 -m http.server -d build
9+
ports:
10+
- port: 8000
11+
onOpen: open-browser
12+
13+
vscode:
14+
extensions:
15+
- asciidoctor.asciidoctor-vscode
16+
- mrorz.language-gettext
17+
- redhat.vscode-xml
18+
- EditorConfig.EditorConfig
19+
- stkb.Rewrap
20+
- viktorzetterstrom.non-breaking-space-highlighter
21+
- xshrim.txt-syntax

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM registry.opensuse.org/documentation/containers/containers/opensuse-daps-toolchain:latest
2+
3+
RUN zypper --gpg-auto-import-keys -n ref && zypper -n in sudo system-group-wheel itstool python39
4+
5+
### Gitpod user ###
6+
# '-l': see https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
7+
RUN groupadd -g 33333 gitpod && \
8+
useradd -l -u 33333 -g 33333 -G wheel -md /home/gitpod -s /bin/bash -p gitpod gitpod && \
9+
# passwordless sudo for users in the 'wheel' group
10+
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/00-wheel-group-nopasswd
11+
12+
ENV HOME=/home/gitpod
13+
WORKDIR $HOME
14+
# custom Bash prompt
15+
RUN { echo && echo ". /etc/bash_completion.d/git-prompt.sh" && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc
16+
17+
### Gitpod user (2) ###
18+
USER gitpod
19+
# use sudo so that user does not get sudo usage info on (the first) login
20+
RUN sudo echo "Running 'sudo' for Gitpod: success" && \
21+
# create .bashrc.d folder and source it in the bashrc
22+
mkdir -p /home/gitpod/.bashrc.d && \
23+
(echo; echo "for i in \$(ls -A \$HOME/.bashrc.d/); do source \$HOME/.bashrc.d/\$i; done"; echo) >> /home/gitpod/.bashrc
24+

0 commit comments

Comments
 (0)