Browse Source

docker-compose: use custom container name "ipfs" instead of auto-generated "[PROJECT_NAME]_ipfs_1"

Fabian Peter Hammerle 3 years ago
parent
commit
a41f58f3cb
2 changed files with 5 additions and 2 deletions
  1. 2 0
      CHANGELOG.md
  2. 3 2
      docker-compose.yml

+ 2 - 0
CHANGELOG.md

@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Changed
+- docker-compose: use custom container name "ipfs" instead of auto-generated "[PROJECT_NAME]_ipfs_1"
 
 ## [0.2.2] - 2020-09-24
 ### Fixed

+ 3 - 2
docker-compose.yml

@@ -6,13 +6,14 @@ volumes:
 services:
   ipfs:
     build: .
-    image: fphammerle/ipfs
+    image: docker.io/fphammerle/ipfs
+    container_name: ipfs
     volumes:
     - ipfs_repo:/ipfs-repo:rw
     ports:
     - '4001:4001'
     - '127.0.0.1:5001:5001'
-    security_opt: ['no-new-privileges']
+    security_opt: [no-new-privileges]
     restart: unless-stopped
 
 # https://docs.docker.com/compose/compose-file/compose-file-v2/