Skip to content

Commit

Permalink
chore: tag RELEASE-20230112
Browse files Browse the repository at this point in the history
  • Loading branch information
ciusji committed Jan 13, 2023
1 parent 81cd7f5 commit 3091f27
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM minio/minio:latest
FROM guinsoolab/annastore:base

ENV PATH=/opt/bin:$PATH

COPY ./minio /opt/bin/minio
COPY dockerscripts/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
COPY ./annastore /opt/bin/annastore

ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]

VOLUME ["/data"]

CMD ["minio"]
CMD ["annastore"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ deliver a range of use cases from AI/ML, analytics, backup/restore and modern we

```bash
docker pull guinsoolab/annastore
docker run -dt \
-p 9000:9000 -p 9090:9090
-v PATH:/mnt/data
-v /etc/default/annastore:/etc/config.env
--name "my_annastore"
annastore server --console-address ":9090"
docker run \
-p 9000:9000 \
-p 9001:9001 \
guinsoolab/annastore:${LATEST_TAG} \
server /Users/admin \
--console-address ":9001"
```

## Documentation
Expand Down
22 changes: 11 additions & 11 deletions dockerscripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#!/bin/sh
#

# If command starts with an option, prepend minio.
if [ "${1}" != "minio" ]; then
# If command starts with an option, prepend annastore.
if [ "${1}" != "annastore" ]; then
if [ -n "${1}" ]; then
set -- minio "$@"
set -- annastore "$@"
fi
fi

# su-exec to requested user, if service cannot run exec will fail.
docker_switch_user() {
if [ -n "${MINIO_USERNAME}" ] && [ -n "${MINIO_GROUPNAME}" ]; then
if [ -n "${MINIO_UID}" ] && [ -n "${MINIO_GID}" ]; then
groupadd -g "$MINIO_GID" "$MINIO_GROUPNAME" && \
useradd -u "$MINIO_UID" -g "$MINIO_GROUPNAME" "$MINIO_USERNAME"
if [ -n "${ANNASTORE_USERNAME}" ] && [ -n "${ANNASTORE_GROUPNAME}" ]; then
if [ -n "${ANNASTORE_UID}" ] && [ -n "${ANNASTORE_GID}" ]; then
groupadd -g "$ANNASTORE_GID" "$ANNASTORE_GROUPNAME" && \
useradd -u "$ANNASTORE_UID" -g "$ANNASTORE_GROUPNAME" "$ANNASTORE_USERNAME"
else
groupadd "$MINIO_GROUPNAME" && \
useradd -g "$MINIO_GROUPNAME" "$MINIO_USERNAME"
groupadd "$ANNASTORE_GROUPNAME" && \
useradd -g "$ANNASTORE_GROUPNAME" "$ANNASTORE_USERNAME"
fi
exec setpriv --reuid="${MINIO_USERNAME}" \
--regid="${MINIO_GROUPNAME}" --keep-groups "$@"
exec setpriv --reuid="${ANNASTORE_USERNAME}" \
--regid="${ANNASTORE_GROUPNAME}" --keep-groups "$@"
else
exec "$@"
fi
Expand Down

0 comments on commit 3091f27

Please sign in to comment.