forked from linode/manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-storybook
24 lines (19 loc) · 1.23 KB
/
Dockerfile-storybook
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM selenium/standalone-chrome:3.141.59-20200409
# Run commands as "node" user. We don't want to run these commands as root
#
# See https://github.com/nodejs/docker-node/blob/d094c98a48659ff9f8d59db8dafb7020e181446a/docs/BestPractices.md
# and https://github.com/nodejs/docker-node/issues/1
RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - && sudo apt-get -qqy update && sudo apt-get -y install nodejs && node --version \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
&& sudo apt-get -qqy update && sudo apt-get -y install yarn && yarn --version
WORKDIR /home/seluser
RUN chown -R seluser:seluser /home/seluser
USER seluser
# Copy the root level package.json and run yarn if anything changesz
COPY --chown=seluser:seluser package.json run_storybook_docker.sh yarn.lock scripts ./
# Copy the rest of the files that don't require installation
COPY --chown=seluser:seluser packages/api-v4 ./packages/api-v4/
COPY --chown=seluser:seluser packages/manager ./packages/manager
# Runs "yarn install" for all child packages
RUN yarn install:all && yarn build:sdk
ENTRYPOINT ["sh","run_storybook_docker.sh"]