Skip to content

Commit 39db79f

Browse files
authored
Merge pull request #5 from bpteam/master
Make build dockerfile independent from host
2 parents 2fde506 + b210558 commit 39db79f

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,19 @@ RUN apt-get install -y --allow-downgrades \
3939
WORKDIR /app/www
4040
RUN mkdir -p /opt/bin && chmod +x /dev/shm
4141

42-
COPY ./dist /app/www/dist
42+
RUN npm install -g npm@latest
43+
RUN npm config set update-notifier false
44+
4345
COPY ./config.json /app/www
46+
COPY ./tsconfig.json /app/www
4447
COPY ./package.json /app/www
4548
COPY ./package-lock.json /app/www
49+
RUN npm install -ci
50+
51+
RUN sh $(npx install-browser-deps)
52+
53+
COPY ./src /app/www/src
54+
RUN npm run build
4655

4756
#ENV ULX_DEBUG true
4857
#ENV DEBUG true
@@ -53,11 +62,7 @@ COPY ./package-lock.json /app/www
5362
ENV NODE_ENV production
5463
ENV ULX_NO_CHROME_SANDBOX true
5564

56-
RUN npm install -g npm@latest
57-
RUN npm config set update-notifier false
58-
RUN npm install --production
59-
60-
RUN sh $(npx install-browser-deps)
65+
RUN rm -rf /app/www/src
6166

6267
EXPOSE 8080
6368
CMD ["npm", "run", "start"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ npm install
2020
npm run build
2121
```
2222

23-
- Now we can run it with Docker OR directly on machine
23+
- Now we can run it directly on machine
2424
> NOTE: Viewing browser and replays will work only on machine
2525
2626
- Docker way

0 commit comments

Comments
 (0)