mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	feat(docker): refactoring the dockerfile
- Move the meilisearch binary to `/bin/meilisearch` so it's always in scope. - Create a `meili_data` directory used as the default working directory
This commit is contained in:
		
							
								
								
									
										15
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -27,9 +27,20 @@ ENV     MEILI_SERVER_PROVIDER docker | ||||
| RUN     apk update --quiet \ | ||||
|         && apk add -q --no-cache libgcc tini curl | ||||
|  | ||||
| COPY    --from=compiler /meilisearch/target/release/meilisearch . | ||||
| # add meilisearch to the `/bin` so you can run it from anywhere and it's easy | ||||
| # to find. | ||||
| COPY    --from=compiler /meilisearch/target/release/meilisearch /bin/meilisearch | ||||
| # To stay compatible with the older version of the container (pre v0.27.0) we're | ||||
| # going to symlink the meilisearch binary in the path to `/meilisearch` | ||||
| RUN     ln -s /bin/meilisearch /meilisearch | ||||
|  | ||||
| # This directory should hold all the data related to meilisearch so we're going | ||||
| # to move our PWD in there. | ||||
| # We don't want to put the meilisearch binary | ||||
| WORKDIR /meili_data | ||||
|  | ||||
|  | ||||
| EXPOSE  7700/tcp | ||||
|  | ||||
| ENTRYPOINT ["tini", "--"] | ||||
| CMD     ./meilisearch | ||||
| CMD     /bin/meilisearch | ||||
|   | ||||
		Reference in New Issue
	
	Block a user