Skip to content

Commit 5957112

Browse files
Merge pull request strapi#219 from sandrotaje/master
Run yarn build in CMD step of Dockerfile
2 parents ff8d827 + f67cb4b commit 5957112

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

examples/custom-with-run/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM strapi/base
2+
3+
WORKDIR /srv/app
4+
5+
COPY ./package.json ./
6+
COPY ./yarn.lock ./
7+
8+
RUN yarn install
9+
10+
COPY . .
11+
12+
ENV NODE_ENV production
13+
14+
15+
EXPOSE 1337
16+
17+
RUN chmod a+x /srv/app/run.sh
18+
19+
CMD ["/srv/app/run.sh"]

examples/custom-with-run/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
yarn build
4+
yarn start

0 commit comments

Comments
 (0)