docker: Enable the sample hook files to execute without error (#256)
- Include jq package in the Dockerfile for parsing JSON - Use sh instead of bash which is not available in Alpine Linux
This commit is contained in:
parent
56acce823d
commit
82bd6c796a
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
id="$TUS_ID"
|
||||
offset="$TUS_OFFSET"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
echo "Upload $TUS_ID ($TUS_SIZE bytes) finished"
|
||||
cat /dev/stdin | jq .
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
id="$TUS_ID"
|
||||
offset="$TUS_OFFSET"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
echo "Upload $TUS_ID terminated"
|
||||
cat /dev/stdin | jq .
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
filename=$(cat /dev/stdin | jq .MetaData.filename)
|
||||
if [ -z "$filename" ]; then
|
||||
|
|
|
@ -22,7 +22,7 @@ FROM alpine:3.8
|
|||
|
||||
COPY --from=builder /go/bin/tusd /usr/local/bin/tusd
|
||||
|
||||
RUN apk add --no-cache ca-certificates \
|
||||
RUN apk add --no-cache ca-certificates jq \
|
||||
&& addgroup -g 1000 tusd \
|
||||
&& adduser -u 1000 -G tusd -s /bin/sh -D tusd \
|
||||
&& mkdir -p /srv/tusd-hooks \
|
||||
|
|
Loading…
Reference in New Issue