Fix docker image workdir and add test

This commit is contained in:
Vidar Holen 2018-03-21 09:37:42 -07:00
parent 6dd5350e3b
commit 795a881219
2 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,8 @@ script:
- DOCKER_BUILDS="$DOCKER_BUILDS $name"
- docker build -t "$name:current" .
- docker run "$name:current" --version
- printf '%s\n' "#!/bin/sh" "echo 'hello world'" > myscript
- docker run -v "$PWD:/mnt" "$name:current" myscript
# Copy static executable from docker image
- id=$(docker create "$name:current")
- docker cp "$id:/bin/shellcheck" "shellcheck"

View File

@ -31,6 +31,6 @@ COPY --from=build /out /
# Resulting ShellCheck image
FROM scratch
LABEL maintainer="Vidar Holen <vidar@vidarholen.net>"
WORKDIR /
WORKDIR /mnt
COPY --from=build /out /
ENTRYPOINT ["/bin/shellcheck"]