Skip to content

Commit 3c799f5

Browse files
author
Steve Jeong
committed
docker: common: rename script files and remove release date.
rename files: Change to a more intuitive name. Signed-off-by: Steve Jeong <[email protected]>
1 parent 9a21e39 commit 3c799f5

File tree

15 files changed

+71
-74
lines changed

15 files changed

+71
-74
lines changed

.github/workflows/docker-focal.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@ jobs:
2424
- name: 'Checkout'
2525
uses: actions/Checkout@v3
2626

27-
- name: 'Get release date'
28-
id: 'release-date'
29-
run: |
30-
echo "RELEASE_DATE=$(date '+%Y%m%d')" >> $GITHUB_OUTPUT
31-
3227
- name: 'Docker upload'
3328
uses: how2flow/upload-docker-action@v1
3429
with:
3530
context: 'docker/focal'
3631
repository: 'workspace'
37-
release: 'focal-v${{ steps.release-date.outputs.RELEASE_DATE }}'
32+
release: 'focal'
3833
username: ${{ secrets.DOCKERHUB_USERNAME }}
3934
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/docker-jammy.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@ jobs:
2424
- name: 'Checkout'
2525
uses: actions/Checkout@v3
2626

27-
- name: 'Get release date'
28-
id: 'release-date'
29-
run: |
30-
echo "RELEASE_DATE=$(date '+%Y%m%d')" >> $GITHUB_OUTPUT
31-
3227
- name: 'Docker upload'
3328
uses: how2flow/upload-docker-action@v1
3429
with:
3530
context: 'docker/jammy'
3631
repository: 'workspace'
37-
release: 'jammy-v${{ steps.release-date.outputs.RELEASE_DATE }}'
32+
release: 'jammy'
3833
username: ${{ secrets.DOCKERHUB_USERNAME }}
3934
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/docker-latest.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ jobs:
1717
- name: 'Checkout'
1818
uses: actions/Checkout@v3
1919

20-
- name: 'Get release date'
21-
id: 'release-date'
22-
run: |
23-
echo "RELEASE_DATE=$(date '+%Y%m%d')" >> $GITHUB_OUTPUT
24-
2520
- name: 'Docker upload'
2621
uses: how2flow/upload-docker-action@v1
2722
with:

docker/focal/Dockerfile

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,39 @@ ARG DEBIAN_FRONTEND=noninteractive
1010
# shell: bash
1111
SHELL ["/bin/bash", "-c"]
1212

13-
ENV USER="user" \
13+
# vars
14+
ENV ID="user" \
1415
TZ="Asia/Seoul" \
1516
CSCOPE="https://raw.githubusercontent.com/how2flow/config/ubuntu/mkcscope.sh" \
1617
GITCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/gitconfig" \
1718
TMUXCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/tmux.conf" \
1819
VIMCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/vimrc" \
19-
VIMCOLORS="https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim"
20+
VIMCOLORS="https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim" \
21+
USER="add-user" \
22+
PACKAGES="install-packages"
2023

2124
# set timezone.
2225
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2326

2427
# root user fixups
2528
USER root
2629
WORKDIR /root
27-
COPY packages packages
28-
COPY user user
29-
RUN chmod +x packages user
30-
RUN ./packages && rm packages
31-
RUN ./user $USER && rm user
32-
RUN wget -O /usr/bin/mkcscope.sh --no-check-certificate $CSCOPE
30+
COPY ${PACKAGES} ${PACKAGES}
31+
COPY ${USER} ${USER}
32+
RUN chmod +x ${PACKAGES} ${USER}
33+
RUN ./${PACKAGES} && rm ${PACKAGES}
34+
RUN ./${USER} && rm ${USER}
35+
RUN wget -O /usr/bin/mkcscope.sh --no-check-certificate ${CSCOPE}
3336

3437
# normal user fixups
35-
USER $USER
36-
WORKDIR /home/$USER
38+
USER ${ID}
39+
WORKDIR /home/${ID}
3740
RUN mkdir -p .vim/colors && \
3841
mkdir -p .vim/bundle
39-
RUN wget -O .gitconfig --no-check-certificate $GITCONFIG && \
40-
wget -O .tmux.conf --no-check-certificate $TMUXCONFIG && \
41-
wget -O .vimrc --no-check-certificate $VIMCONFIG && \
42-
wget -O .vim/colors/gruvbox.vim --no-check-certificate $VIMCOLORS
42+
RUN wget -O .gitconfig --no-check-certificate ${GITCONFIG} && \
43+
wget -O .tmux.conf --no-check-certificate ${TMUXCONFIG} && \
44+
wget -O .vimrc --no-check-certificate ${VIMCONFIG} && \
45+
wget -O .vim/colors/gruvbox.vim --no-check-certificate ${VIMCOLORS}
4346
RUN git clone "https://github.com/VundleVim/Vundle.vim.git" \
4447
.vim/bundle/Vundle.vim
4548
RUN vim +PluginInstall +qall
File renamed without changes.
File renamed without changes.

docker/jammy/Dockerfile

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,43 @@ ARG DEBIAN_FRONTEND=noninteractive
1010
# shell: bash
1111
SHELL ["/bin/bash", "-c"]
1212

13-
ENV USER="user" \
13+
# vars
14+
ENV ID="user" \
1415
TZ="Asia/Seoul" \
1516
CSCOPE="https://raw.githubusercontent.com/how2flow/config/ubuntu/mkcscope.sh" \
1617
GITCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/gitconfig" \
1718
TMUXCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/tmux.conf" \
1819
VIMCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/vimrc" \
19-
VIMCOLORS="https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim"
20+
VIMCOLORS="https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim" \
21+
USER="add-user" \
22+
PACKAGES="install-packages"
2023

2124
# set timezone.
2225
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2326

2427
# root user fixups
2528
USER root
2629
WORKDIR /root
27-
COPY packages packages
28-
COPY user user
29-
RUN chmod +x packages user
30-
RUN ./packages && rm packages
31-
RUN ./user $USER && rm user
32-
RUN wget -O /usr/bin/mkcscope.sh --no-check-certificate $CSCOPE
30+
COPY ${PACKAGES} ${PACKAGES}
31+
COPY ${USER} ${USER}
32+
RUN chmod +x ${PACKAGES} ${USER}
33+
RUN ./${PACKAGES} && rm ${PACKAGES}
34+
RUN ./${USER} && rm ${USER}
35+
RUN wget -O /usr/bin/mkcscope.sh --no-check-certificate ${CSCOPE}
36+
3337
# allow rsa-key type Authentication.
3438
RUN echo "HostKeyAlgorithms +ssh-rsa" >> /etc/ssh/ssh_config
3539
RUN echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/ssh_config
3640

3741
# normal user fixups
38-
USER $USER
39-
WORKDIR /home/$USER
42+
USER ${ID}
43+
WORKDIR /home/${ID}
4044
RUN mkdir -p .vim/colors && \
4145
mkdir -p .vim/bundle
42-
RUN wget -O .gitconfig --no-check-certificate $GITCONFIG && \
43-
wget -O .tmux.conf --no-check-certificate $TMUXCONFIG && \
44-
wget -O .vimrc --no-check-certificate $VIMCONFIG && \
45-
wget -O .vim/colors/gruvbox.vim --no-check-certificate $VIMCOLORS
46+
RUN wget -O .gitconfig --no-check-certificate ${GITCONFIG} && \
47+
wget -O .tmux.conf --no-check-certificate ${TMUXCONFIG} && \
48+
wget -O .vimrc --no-check-certificate ${VIMCONFIG} && \
49+
wget -O .vim/colors/gruvbox.vim --no-check-certificate ${VIMCOLORS}
4650
RUN git clone "https://github.com/VundleVim/Vundle.vim.git" \
4751
.vim/bundle/Vundle.vim
4852
RUN vim +PluginInstall +qall
File renamed without changes.
File renamed without changes.

docker/jekyll/Dockerfile

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,42 @@ LABEL version="0.0.1"
77

88
ARG DEBIAN_FRONTEND=noninteractive
99

10+
# shell: bash
1011
SHELL ["/bin/bash", "-c"]
11-
ENV LC_ALL=C.UTF-8
1212

1313
# vars
14-
ENV USER="user" \
14+
ENV ID="user" \
1515
TZ="Asia/Seoul" \
1616
CSCOPE="https://raw.githubusercontent.com/how2flow/config/ubuntu/mkcscope.sh" \
1717
GITCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/gitconfig" \
1818
TMUXCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/tmux.conf" \
1919
VIMCONFIG="https://raw.githubusercontent.com/how2flow/config/ubuntu/vimrc" \
20-
VIMCOLORS="https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim"
20+
VIMCOLORS="https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim" \
21+
USER="add-user" \
22+
PACKAGES="install-packages"
2123

2224
# set timezone.
2325
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2426

2527
# root user fixups
2628
USER root
2729
WORKDIR /root
28-
COPY packages packages
29-
COPY user user
30-
RUN chmod +x packages user
31-
RUN ./packages && rm packages
32-
RUN ./user $USER && rm user
33-
RUN wget -O /usr/bin/mkcscope.sh --no-check-certificate $CSCOPE
30+
COPY ${PACKAGES} ${PACKAGES}
31+
COPY ${USER} ${USER}
32+
RUN chmod +x ${PACKAGES} ${USER}
33+
RUN ./${PACKAGES} && rm ${PACKAGES}
34+
RUN ./${USER} && rm ${USER}
35+
RUN wget -O /usr/bin/mkcscope.sh --no-check-certificate ${CSCOPE}
3436

3537
# normal user fixups
36-
USER $USER
37-
WORKDIR /home/$USER
38+
USER ${ID}
39+
WORKDIR /home/${ID}
3840
RUN mkdir -p .vim/colors && \
3941
mkdir -p .vim/bundle
40-
RUN wget -O .gitconfig --no-check-certificate $GITCONFIG && \
41-
wget -O .tmux.conf --no-check-certificate $TMUXCONFIG && \
42-
wget -O .vimrc --no-check-certificate $VIMCONFIG && \
43-
wget -O .vim/colors/gruvbox.vim --no-check-certificate $VIMCOLORS
42+
RUN wget -O .gitconfig --no-check-certificate ${GITCONFIG} && \
43+
wget -O .tmux.conf --no-check-certificate ${TMUXCONFIG} && \
44+
wget -O .vimrc --no-check-certificate ${VIMCONFIG} && \
45+
wget -O .vim/colors/gruvbox.vim --no-check-certificate ${VIMCOLORS}
4446
RUN git clone "https://github.com/VundleVim/Vundle.vim.git" \
4547
.vim/bundle/Vundle.vim
4648
RUN vim +PluginInstall +qall

0 commit comments

Comments
 (0)