Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"${USER}"

# Update package list and install packages
RUN apt-get update && apt-get install -y --no-install-recommends \

Check failure on line 28 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
autoconf \
automake \
libtool \
Expand Down Expand Up @@ -85,7 +85,7 @@

# obtain busy box for file ops in scratch image
ARG TARGETARCH
RUN case "${TARGETARCH}" in \

Check failure on line 88 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC2086 info: Double quote to prevent globbing and word splitting.

Check failure on line 88 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
amd64) ARCH=x86_64 ;; \
arm64) ARCH=armv8l ;; \
*) echo "Unsupported arch: ${TARGETARCH}" && exit 1 ;; \
Expand All @@ -93,6 +93,9 @@
wget -O /busybox https://busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-${ARCH} && \
chmod +x /busybox

# Create tmp directory with proper permissions
RUN rm -rf /tmp && mkdir -p /tmp && chmod 1777 /tmp

# Build a minimal docker image
FROM scratch
WORKDIR /app
Expand Down Expand Up @@ -129,23 +132,26 @@
COPY --from=build --chown=0:0 /app/www /app/www
COPY --from=build --chown=0:0 /app/tmp /tmp

# Copy tmp directory
COPY --from=build /tmp /tmp

# This seems to be the only way to set permissions properly
# this only works as we're copying over the dependencies for git
# which includes /lib/ld-musl-* files
# COPY --from=build /bin /bin
RUN /bin/busybox chmod -R a+rwX /tmp

Check failure on line 142 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
RUN /bin/busybox chmod -R a+rwX /app/www

Check failure on line 143 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.

# so we can run commands on remote network volumes
RUN /bin/busybox mkdir /nonexistent/ && /bin/busybox chown appuser:appuser /nonexistent/

Check failure on line 146 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
USER appuser:appuser
RUN /bin/busybox touch /nonexistent/.gitconfig

Check failure on line 148 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
RUN /git config --global --add safe.directory '*'

Check failure on line 149 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.

# remove the shell and make the home folder read only to the user
USER root:root
RUN /bin/busybox chown -R root:root /nonexistent/

Check failure on line 153 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
RUN /bin/busybox rm -rf /bin/busybox

Check failure on line 154 in Dockerfile

View workflow job for this annotation

GitHub Actions / dockerfile-style / dockerfile-style

SC1008 error: This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.

# Use an unprivileged user.
USER appuser:appuser
Expand Down
Loading