Skip to content

Commit 2d46188

Browse files
committed
Improve front image build
1 parent 14522b2 commit 2d46188

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

.dockerignore

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
.git
2-
.github
3-
4-
**/node_modules/*
5-
.circleci
6-
.github
71
design
82
devops
93
docs
104
fixtures
115
hooks
126
postgres-data
137

14-
*.md
8+
**/.circleci
9+
**/*.log
10+
**/*.md
11+
**/._*
12+
**/.dockerignore
13+
**/.DS_Store
14+
**/.git/
15+
**/.gitattributes
16+
**/.gitignore
17+
**/.gitmodules
18+
**/.github
19+
**/Dockerfile*
20+
**/Thumbs.db
21+
.env*
22+
build/
23+
**/node_modules/

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ FROM node:8.12-alpine AS node
33

44
WORKDIR /code
55

6-
ENV NODE_PATH /code/src
7-
COPY ./frontend /code/
8-
RUN yarn && yarn build
6+
COPY ./frontend/package.json ./frontend/yarn.lock /code/
7+
RUN yarn install --pure-lockfile
98

9+
COPY ./frontend/ /code/
10+
RUN yarn build
1011

1112
# Second stage: build base backend
1213
FROM python:3.7-alpine AS backend

0 commit comments

Comments
 (0)