Work around git directory ownership change check
Add a mitigation for the extra checks that Git added in response to CVE-2022-24765.pull/32934/head
parent
108434f8b1
commit
edb9f05b84
|
@ -27,16 +27,18 @@ RUN mkdir $HOME/src && \
|
||||||
FROM golang:1.16-alpine
|
FROM golang:1.16-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
|
runuser \
|
||||||
git \
|
git \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
rsync \
|
rsync \
|
||||||
npm && \
|
npm && \
|
||||||
npm install -D autoprefixer postcss-cli
|
npm install -D autoprefixer postcss-cli
|
||||||
|
|
||||||
RUN mkdir -p /usr/local/src && \
|
RUN mkdir -p /var/hugo && \
|
||||||
cd /usr/local/src && \
|
|
||||||
addgroup -Sg 1000 hugo && \
|
addgroup -Sg 1000 hugo && \
|
||||||
adduser -Sg hugo -u 1000 -h /src hugo
|
adduser -Sg hugo -u 1000 -h /var/hugo hugo && \
|
||||||
|
chown -R hugo: /var/hugo && \
|
||||||
|
runuser -u hugo -- git config --global --add safe.directory /src
|
||||||
|
|
||||||
COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
|
COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue