Skip to content

Will-gabia/docker-container-api

Repository files navigation

Docker 컨테이너 관리 API

Docker 컨테이너를 생성/관리하는 API입니다. 자세한 내용은 API 문서를 참조하세요.

사용법

환경 변수 설정

cp .env.example .env

.env 파일에서 API_KEY를 설정하세요:

API_KEY=your-secret-api-key

개발 서버 시작

npm install
npm dev

서버가 http://localhost:3333에서 실행됩니다.

API 호출 예시

컨테이너 생성:

curl -X POST http://localhost:3333/containers \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-container"}'

컨테이너 시작:

curl -X POST http://localhost:3333/containers/abc123/start \
  -H "X-API-Key: $API_KEY"

컨테이너 정지:

curl -X POST http://localhost:3333/containers/abc123/stop \
  -H "X-API-Key: $API_KEY"

컨테이너 조회:

curl http://localhost:3333/containers/abc123 \
  -H "X-API-Key: $API_KEY"

컨테이너 목록:

curl http://localhost:3333/containers \
  -H "X-API-Key: $API_KEY"

컨테이너 삭제:

curl -X DELETE http://localhost:3333/containers/abc123 \
  -H "X-API-Key: $API_KEY"

특징

  • 컨테이너 생성/시작/정지/삭제/조회 기능
  • API Key 기반 인증
  • JSON 형식 응답
  • 셸 스크립트 기반 컨테이너 생성 (시스템 엔지니어 관리)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors