2019-1-5lesson

Jan 5, 2019

Dockerfile install very slow

According to this artical, I resolve an issue that i have to load all node_module files very time;

This method help with: building the same package.json and and same file path, would never ever to load every file again, but first would still very slow.

do step:

first add your .dockerignore with:

1
2
3
4
5
6
.git
.results
script
*Dockerfile*
node_modules
package-lock.json

then:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM node:8.12.0-alpine

ARG NODE_ENV=development
ENV NODE_ENV=$NODE_ENV

WORKDIR /watchvideo_server

COPY package.json yarn.lock ./

COPY . /watchvideo_server

RUN yarn

USER node

EXPOSE 9526

CMD ["yarn", "start"]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
version: "3"
services:
mysql:
build: ./mysql
restart: always
ports:
- "4444:3306"
watch:
build: .
hostname: watch
command: yarn debug
volumes:
- ./dist:/watchvideo_server/dist
- ./package.json:/watchvideo_server/package.json
- ./yarn.lock:/watchvideo_server/yarn.lock
ports:
- "9526:9526"
- "9222:9222"
depends_on:
- mysql
links:
- mysql
environment:
- DATABASE_HOST=mysql

I’m making a media site

When 2018.6, I decided to make some games to try earning some money and advertise.

But gov said NO: gov suddenly gave a notify, field of game would become more difficult.

OK, when 2018.12, I change my mind to make a media site to provide some picture sources and ability of watching video.

But gov immediatly gave notify: master of BT video site was caughted and get 3 year of prison with 80w RMB ticket.

Ability of IT worker is very difficultlly control by zh gov, so they afraid of any man is out of control.

If you feel comfortable with that ease, you will done soon or later.

I’m would never be.

Man become poverty

Man dare to chanllenge for fight, but during recent couple of year, harsh enviroument is expressing more tough to not getting close to the civilization and ability.

Man died by kind of poverty.

Poverty caused by not treating them as power, but treating tasty word as governance model.

So Man deserve poverty by not taking seriously of bazoo?

fucking bazooer!!!