chore: fix /.cache and /.erlang.cookie in erlang container
This commit is contained in:
parent
9b999f070d
commit
7bbd6353aa
|
@ -18,7 +18,6 @@ services:
|
||||||
- emqx_bridge
|
- emqx_bridge
|
||||||
volumes:
|
volumes:
|
||||||
- ../..:/emqx
|
- ../..:/emqx
|
||||||
- ./.cache:/.cache
|
|
||||||
working_dir: /emqx
|
working_dir: /emqx
|
||||||
tty: true
|
tty: true
|
||||||
user: "${UID_GID}"
|
user: "${UID_GID}"
|
||||||
|
|
|
@ -90,8 +90,8 @@ for file in "${FILES[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# shellcheck disable=2086 # no quotes for F_OPTIONS
|
# shellcheck disable=2086 # no quotes for F_OPTIONS
|
||||||
mkdir -p ./.cache && chmod a+rwx ./.cache
|
UID_GID="$(id -u):$(id -g)"
|
||||||
UID_GID="$(id -u):$(id -g)" docker-compose $F_OPTIONS up -d --build
|
UID_GID=$UID_GID docker-compose $F_OPTIONS up -d --build
|
||||||
|
|
||||||
# /emqx is where the source dir is mounted to the Erlang container
|
# /emqx is where the source dir is mounted to the Erlang container
|
||||||
# in .ci/docker-compose-file/docker-compose.yaml
|
# in .ci/docker-compose-file/docker-compose.yaml
|
||||||
|
@ -100,6 +100,8 @@ if [[ -t 1 ]]; then
|
||||||
TTY='-t'
|
TTY='-t'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
docker exec -i $TTY -u root:root "$ERLANG_CONTAINER" bash -c "mkdir /.cache && chown $UID_GID /.cache"
|
||||||
|
docker exec -i $TTY -u root:root "$ERLANG_CONTAINER" bash -c "touch /.erlang.cookie && chown $UID_GID /.erlang.cookie"
|
||||||
if [ "$CONSOLE" = 'yes' ]; then
|
if [ "$CONSOLE" = 'yes' ]; then
|
||||||
docker exec -i $TTY "$ERLANG_CONTAINER" bash -c "make run"
|
docker exec -i $TTY "$ERLANG_CONTAINER" bash -c "make run"
|
||||||
else
|
else
|
||||||
|
@ -107,6 +109,6 @@ else
|
||||||
docker exec -i $TTY "$ERLANG_CONTAINER" bash -c "make ${WHICH_APP}-ct"
|
docker exec -i $TTY "$ERLANG_CONTAINER" bash -c "make ${WHICH_APP}-ct"
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
# shellcheck disable=2086 # no quotes for F_OPTIONS
|
# shellcheck disable=2086 # no quotes for F_OPTIONS
|
||||||
UID_GID="$(id -u):$(id -g)" docker-compose $F_OPTIONS down
|
UID_GID=$UID_GID docker-compose $F_OPTIONS down
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue