Stanley Imagem
Playwright Alpine docker

Image for playwright docker alpine 📦!

Stargazers Made by ODGodinho Forks Repository size GitHub last commit License

Table of Contents


🎇 Benefits

  • 🚀 Speed start new project playwright docker
  • 🎇 Reduced size image
  • 📦 Support private and public packages npm

📗 Images

⏩ Get Started

Read this documentation for private packages npm https://docs.npmjs.com/docker-and-private-modules

🍀 Create Dockerfile

FROM dragonsgamers/playwright-alpine:latest

# add only if your project has private package
ARG NPM_TOKEN

# App
WORKDIR /app

COPY --chown=node package.json ./
# Add only you project exists .npmrc file
COPY --chown=node .npmrc .npmrc

# Use yarn.lock or package.lock never both
COPY --chown=node package.json package-lock.json yarn.lock ./
RUN yarn install

CMD [ "node", "dist/index.js" ]

📦 Create Docker Compose file

version: '3.7'

services:
  app:
    build:
      dockerfile: Dockerfile
      context: .
      args:
        - NPM_TOKEN=${NPM_TOKEN} # Add only if your project has private package
    volumes:
      - /app/node_modules/
      - ./:/app/