forked from AndreasAugustin/actions-template-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (33 loc) · 1.41 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#######################################
# image for dev build environment
######################################
FROM alpine:3.19.0 as dev
ARG GH_CLI_VER=2.34.0
# install packages
RUN apk add --update --no-cache bash make git zsh curl tmux musl openssh git-lfs vim yq
RUN wget https://github.com/cli/cli/releases/download/v${GH_CLI_VER}/gh_${GH_CLI_VER}_linux_386.tar.gz -O ghcli.tar.gz
RUN tar --strip-components=1 -xf ghcli.tar.gz
# Make zsh your default shell for tmux
RUN echo "set-option -g default-shell /bin/zsh" >> /root/.tmux.conf
# install oh-my-zsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
ADD src/*.sh /bin/
RUN chmod +x /bin/entrypoint.sh \
&& chmod +x /bin/sync_template.sh \
&& chmod +x /bin/sync_common.sh
RUN mkdir -p /root/.ssh \
&& ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts
WORKDIR /app
#######################################
# image for creating the documentation
######################################
FROM node:21.5.0-alpine as docs
# install packages
RUN apk add --update --no-cache bash make git zsh curl tmux
# Make zsh your default shell for tmux
RUN echo "set-option -g default-shell /bin/zsh" >> /root/.tmux.conf
# install oh-my-zsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# install quality gate
RUN npm install -g markdownlint-cli
WORKDIR /app