Skip to content
Snippets Groups Projects
Commit 9ab847ec authored by nimrod's avatar nimrod
Browse files

Remove dependency on /volume .

parent 02d3b7ba
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,6 @@ RUN if command -v apt-get; \ ...@@ -16,6 +16,6 @@ RUN if command -v apt-get; \
ARG userland ARG userland
ADD [ "https://www.shore.co.il/blog/static/runas-${userland}", "/entrypoint" ] ADD [ "https://www.shore.co.il/blog/static/runas-${userland}", "/entrypoint" ]
ENTRYPOINT [ "/bin/sh", "/entrypoint" ] ENTRYPOINT [ "/bin/sh", "/entrypoint" ]
VOLUME /volume VOLUME /data
WORKDIR /volume WORKDIR /data
ENV HOME /volume ENV HOME /data
...@@ -5,7 +5,7 @@ _test () { ...@@ -5,7 +5,7 @@ _test () {
tag="${2:-latest}" tag="${2:-latest}"
userland="${3:-gnu}" userland="${3:-gnu}"
docker build -t "runas-$name" --build-arg "image=$name:$tag" --build-arg "userland=$userland" ./ docker build -t "runas-$name" --build-arg "image=$name:$tag" --build-arg "userland=$userland" ./
docker run --rm -v "$BATS_TEST_DIRNAME:/volume" "runas-$name" touch "$name.touch" docker run --rm -v "$BATS_TEST_DIRNAME:/data" "runas-$name" touch "$name.touch"
test "$(id -u)" = "$(stat -c '%u' $name.touch)" test "$(id -u)" = "$(stat -c '%u' $name.touch)"
test "$(id -g)" = "$(stat -c '%g' $name.touch)" test "$(id -g)" = "$(stat -c '%g' $name.touch)"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment