mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-01-07 19:39:40 +05:00
Use soundcloak user for Docker image; update ignore files
This commit is contained in:
@@ -9,7 +9,9 @@ WORKDIR /build
|
||||
COPY . .
|
||||
RUN go install github.com/a-h/templ/cmd/templ@latest && \
|
||||
templ generate && \
|
||||
CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static'" -o ./app
|
||||
CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static'" -o ./app && \
|
||||
echo "soundcloak:x:5000:5000:Soundcloak user:/:/sbin/nologin" > /etc/minimal-passwd && \
|
||||
echo "soundcloak:x:5000:" > /etc/minimal-group
|
||||
|
||||
FROM node:${NODE_VERSION} AS node
|
||||
WORKDIR /hls.js
|
||||
@@ -22,7 +24,11 @@ COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=build /build/assets /assets
|
||||
COPY --from=build /build/app /app
|
||||
COPY --from=node /hls.js/node_modules/hls.js/dist/hls.light.min.js /node_modules/hls.js/dist/hls.light.min.js
|
||||
COPY --from=build /etc/minimal-passwd /etc/passwd
|
||||
COPY --from=build /etc/minimal-group /etc/group
|
||||
|
||||
EXPOSE 4664
|
||||
|
||||
USER soundcloak
|
||||
|
||||
ENTRYPOINT ["/app"]
|
||||
|
||||
Reference in New Issue
Block a user