Skip to content

Commit 1cb9ffd

Browse files
author
Steve Jeong
committed
workspace v3.0.0
Signed-off-by: Steve Jeong <[email protected]>
1 parent ab6cbbe commit 1cb9ffd

27 files changed

+480
-456
lines changed
Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
name: 'docker-focal (CI/CD)'
1+
name: 'docker-workspace (CI/CD)'
22

33
on:
44
push:
55
branches:
66
- 'master'
77
paths:
8-
- 'docker/focal/*'
9-
tags-ignore:
10-
- 'v2.0.*'
11-
workflow_dispatch:
12-
inputs:
13-
logLevel:
14-
description: 'Log level'
15-
required: true
16-
default: 'warning'
17-
tags:
18-
description: 'Test scenario tags'
8+
- 'docker/base/*'
199

2010
jobs:
2111
docker:
@@ -27,8 +17,8 @@ jobs:
2717
- name: 'Docker upload'
2818
uses: how2flow/upload-docker-action@v1
2919
with:
30-
context: 'docker/focal'
20+
context: 'docker/base'
3121
repository: 'workspace'
32-
release: 'focal'
22+
release: 'base'
3323
username: ${{ secrets.DOCKERHUB_USERNAME }}
3424
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/docker-jammy.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/docker-jekyll.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: 'docker-jekyll (CI/CD)'
22

33
on:
4-
push:
5-
branches:
6-
- 'master'
7-
paths:
8-
- 'docker/jekyll/*'
9-
tags-ignore:
10-
- 'v2.0.*'
114
workflow_dispatch:
125
inputs:
136
logLevel:

.github/workflows/docker-latest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'docker-latest (CI/CD)'
1+
name: 'docker-workspace (CI/CD)'
22

33
on:
44
workflow_dispatch:

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ $ ./set --help
2525

2626
### docker image
2727

28-
**support list:**
29-
- focal
30-
- jammy
31-
32-
pull & run image: focal
28+
pull & run image
3329
```
34-
$ docker pull how2flow/workspace:focal
35-
$ docker run -it how2flow/workspace:focal bash
30+
$ docker pull how2flow/workspace:latest
31+
$ docker run -it how2flow/workspace:latest
3632
```

docker/base/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Dockerfile
2+
FROM ubuntu:latest
3+
LABEL author="how2flow (Steve Jeong)"
4+
LABEL version="3.0.0"
5+
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
8+
# shell: bash
9+
SHELL ["/bin/bash", "-c"]
10+
11+
ENV ID="user" \
12+
TZ="Asia/Seoul" \
13+
WGET_FLAG="--no-check-certificate"
14+
15+
# set timezone.
16+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
17+
18+
USER root
19+
WORKDIR /root
20+
COPY fixups fixups
21+
COPY id id
22+
COPY sudo sudo
23+
RUN chmod -R +x fixups id sudo
24+
RUN ./fixups/pkg
25+
RUN ./fixups/ssh
26+
RUN rm -rf fixups
27+
28+
USER ${ID}
29+
WORKDIR /home/${ID}
30+
RUN mkdir -p .vim/colors .vim/bundle
31+
RUN wget -O .gitconfig $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/gitconfig"
32+
RUN wget -O .tmux.conf $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/tmux.conf"
33+
RUN wget -O .vimrc $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/vimrc"
34+
RUN wget -O .vim/colors/gruvbox.vim $WGET_FLAG "https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim"
35+
RUN git clone "https://github.com/VundleVim/Vundle.vim.git" .vim/bundle/Vundle.vim
36+
RUN vim +PluginInstall +qall
37+
RUN echo "alias tmux='tmux -2'" >> .bashrc
38+
RUN echo "set -o vi" >> .bashrc

docker/base/Dockerfile.tags

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dockerfile
2+
FROM how2flow/workspace:base
3+
4+
ENV ID="tags"
5+
6+
USER root
7+
WORKDIR /root
8+
COPY fixups fixups
9+
RUN chmod -R +x fixups
10+
RUN ./fixups/pkg
11+
# RUN ./fixups/..
12+
RUN ./id $ID
13+
RUN ./sudo $ID
14+
RUN rm -rf fixups id sudo
15+
16+
USER ${ID}
17+
WORKDIR /home/${ID}
18+
# user fixups ...

docker/base/fixups/pkg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
apt-get update && apt-get install -y --no-install-recommends git sudo ssh tmux vim wget
4+
5+
if [ -x "$(command -v brltty)" ]; then
6+
apt-get remove brltty
7+
fi

docker/base/fixups/ssh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# set ssh-rsa after install packages. (ubuntu 22.04 ~)
4+
# written by how2flow(Steve Jeong).
5+
6+
SSH_CONF="/etc/ssh"
7+
SSH_CONF_FILE="/etc/ssh/ssh_config"
8+
9+
# for ssh-rsa
10+
if [ -d "${SSH_CONF}" ]; then
11+
echo " HostKeyAlgorithms +ssh-rsa" >> "${SSH_CONF_FILE}"
12+
echo " PubkeyAcceptedKeyTypes +ssh-rsa" >> "${SSH_CONF_FILE}"
13+
fi
14+
15+
echo "Finish ssh configs"

0 commit comments

Comments
 (0)