0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DockerでNext.js with-typescript-eslint-jest

Posted at

##環境

ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H524
Docker version 20.10.5, build 55c4c88
docker-compose version 1.28.5, build c4eb3a1f

##Docker準備

FROM node:14.16.1-alpine3.13
WORKDIR /usr/src/app
docker-compose.yml
version: '3'
services:
  node:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - ./:/usr/src/app
    command: sh -c "cd app && npm run dev"
    ports:
      - '3000:3000'

##create-next-appコマンドをインストール

$ docker-compose run --rm node npm install create-next-app

##create-next-appコマンドを実行
templateをwith-typescript-eslint-jest
プロジェクト名をapp

$ docker-compose run --rm node npx create-next-app --example with-typescript-eslint-jest app

##docker-compose up

$ docker-compose up

http://localhost:3000 にアクセス
image.png

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?