ingenious
ingenious

Reputation: 772

What is the equivalent of ‍-h in docker-compose?

I want convert docker run to docker-compose with -h parameter

What is the equivalent of ‍‍‍‍-h in docker-compose?

My docker run command:

docker run --rm -p 8080:80/tcp -p 1935:1935 -p 3478:3478 
-p 3478:3478/udp bigbluebutton -h webinar.mydomain.com

My docker-compose

version: "3"

services:
  bigbluebutton:
    build: .
    container_name: "bigbluebutton"
    restart: unless-stopped
    ports:
      - 1935:1935
      - 3478:3478
      - 3478:3478/udp
      - 8080:80
    networks:
      public:

networks:
  public:
    external:
      name: public


Upvotes: 0

Views: 469

Answers (1)

David Maze
David Maze

Reputation: 159495

Anything that appears after the docker run image name is the Compose command:.

docker run \
  --rm -p 8080:80/tcp -p 1935:1935 \  # Docker options
  -p 3478:3478 -p 3478:3478/udp \     # More Docker options
  bigbluebutton \                     # Image name
  -h webinar.mydomain.com             # Command
services:
  bigbluebutton:
    build: .
    command: -h webinar.mydomain.com
    ports: ['8080:80', '1935:1935', '3478:3478', '3478:3478/udp']

Upvotes: 1

Related Questions