Skip to content

Commit

Permalink
Testing minimal image
Browse files Browse the repository at this point in the history
  • Loading branch information
JS Fillman committed Apr 1, 2024
1 parent 1373122 commit b4d7aa4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:latest
# Builder stage
FROM alpine:latest as builder

# Update and install necessary packages
RUN apk update && \
apk add p7zip rclone
apk add --no-cache p7zip rclone

# Create config directory
RUN mkdir -p /root/.config/rclone/
Expand All @@ -11,6 +11,15 @@ RUN mkdir -p /root/.config/rclone/
COPY rclone.conf /root/.config/rclone/rclone.conf
COPY app/ /app/

# Final stage
FROM alpine:latest

# Copy necessary binaries and files from builder stage
COPY --from=builder /usr/bin/rclone /usr/bin/rclone
COPY --from=builder /usr/bin/7z /usr/bin/7z
COPY --from=builder /root/.config/rclone/rclone.conf /root/.config/rclone/rclone.conf
COPY --from=builder /app/ /app/

WORKDIR /app

ENTRYPOINT /app/zip2cloud
ENTRYPOINT ["/app/zip2cloud"]
2 changes: 1 addition & 1 deletion app/zip2cloud
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ done

## Create a block that, upon success of rclone above, delete _only_ files that were uploaded
## For each $FILE.7z in $ZIP_DIR, do a "rm -rf $DUMP_BASE/$FILE" to remove the original dump
#[ -z "${DELETE_DUMP}" ] || { echo "Clearing contents of /dump/"; cd /dump/; rm -rf *; }
#[ -z "${DELETE_DUMP}" ] || { echo "Clearing contents of /dump/"; cd /dump/; rm -rf *; }

0 comments on commit b4d7aa4

Please sign in to comment.