Алексей Авдеев, Neuron.Digital
$ brew update
$ brew install mysql
...
$ \curl -sSL https://get.rvm.io | bash
...
$ rails s
$ docker-compose up api
...
Listening localhost:8080
$ docker rm --volumes api
$ docker system prune --all
$ brew cask install docker
$ docker run ubuntu:14.04 /bin/echo 'Hello world'
Hello world
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
...
Hello from Docker!
This message shows that your installation appears...
...
Установить Google Chrome for Desktop.
Установить текущую LTS-версию Node.
$ npm install -g lighthouse
$ lighthouse http://frontendconf.ru
$ docker run \
--rm \
--name lighthouse \
-it \
--volume ~:/home/chrome/reports \
--cap-add=SYS_ADMIN \
femtopixel/google-lighthouse http://frontendconf.ru
$ docker service scale frontend=10
frontend scaled to 10
LABEL maintainer="[email protected]"
$ docker inspect NAME|ID
"Labels": {
"maintainer": "[email protected]"
}
FROM node:10-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY vue.config.js babel.config.js ./
COPY src src
RUN npm run build
FROM nginx:1.13-alpine
COPY nginx /etc/nginx/conf.d
COPY --from=builder /app/dist/ /usr/share/nginx/html/
EXPOSE 5000
docker build --tag my-app .
docker run -p 5000:5000 --tag my-app
FROM node:10-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 5000
CMD ["node", "server.js"]
FROM python:3-alpine
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python", "./your-daemon-or-script.py"]
services:
api:
build: ./api
front:
build: ./front
reverse-proxy:
image: abiosoft/caddy
ports:
- 80:80
volumes:
- ./Caddyfile:/etc/Caddyfile
$ docker-compose up