-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (43 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
48
49
50
51
##
## Create an image that can be used to play with
## ce-styles commands.
##
## To create the image:
## docker build -t openstax/ce-styles:latest .
##
## To start the container:
## docker run --mount type=bind,source=$(pwd),target=/code -it openstax/ce-styles:latest /bin/bash
## where the ce-styles repo has been cloned into the
## current working directory.
##
## To run the code:
## ./scripts/test
## See:
## https://github.com/openstax/ce-styles
## for details.
##
#############################################################################################################
FROM node:22
WORKDIR /code
# Install dependencies
COPY \
package.json \
yarn.lock \
./
RUN yarn install
RUN apt-get update
RUN apt-get install shellcheck
RUN apt-get install wget
# Install a quick colorized prompt and turn on ls coloring
RUN git clone https://github.com/nojhan/liquidprompt.git ~/liquidprompt && \
echo '[[ $- = *i* ]] && source ~/liquidprompt/liquidprompt' >>~/.bashrc && \
mkdir -p ~/.config && \
echo 'export LP_HOSTNAME_ALWAYS=1' >>~/.config/liquidpromptrc && \
echo 'export LP_USER_ALWAYS=-1' >>~/.config/liquidpromptrc && \
sed -i "/color=auto/"' s/# //' ~/.bashrc && \
sed -i "/alias ls/,/lA/"' s/# //' ~/.bashrc
# Post-install builds the styles/output/_web-styles.json
# which is not needed for being in a docker container.
ENV SKIP_MY_POSTINSTALL=true
# Install code
COPY . ./