0
1

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 1 year has passed since last update.

40代おっさんDockerメモ②

Posted at

本記事について

この記事はプログラミング初学者の私が学んでいく中でわからない単語や概要を分かりやすくまとめたものです。
もし不正などありましたらコメントにてお知らせいただければ幸いです。

YAML

YAMLファイルはインデントで区切りをつけるJSONの兄弟で、セミコロンでなくインデントを使うpythonに似てる。

トップダウンのヒエラルキーになっている。

基本Key-Valueペアのマップになっている。

version: "3.7"
services:
  nginx:
    image: nginx:latest
    container_name: docker_compose_nginx
    environment:
      - env_key=env_value
    ports:
      - "80:80"
    volumes:
      - ${PWD}:/usr/share/nginx/html:ro
  ubuntu:
    image: ubuntu
    container_name: docker_compose_ubuntu
    command: ["sleep", "1500"]
    ports:
      - "8080:8080"
  busybox:
    image: busybox
    container_name: docker_compose_busybox
    command: ["sleep", "1500"]
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?