mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 04:44:26 +01: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:
parent
013fe4cbc9
commit
683206e140
15
Dockerfile
15
Dockerfile
@ -27,9 +27,20 @@ ENV MEILI_SERVER_PROVIDER docker
|
|||||||
RUN apk update --quiet \
|
RUN apk update --quiet \
|
||||||
&& apk add -q --no-cache libgcc tini curl
|
&& 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
|
EXPOSE 7700/tcp
|
||||||
|
|
||||||
ENTRYPOINT ["tini", "--"]
|
ENTRYPOINT ["tini", "--"]
|
||||||
CMD ./meilisearch
|
CMD /bin/meilisearch
|
||||||
|
Loading…
Reference in New Issue
Block a user