Rafael Calleja commited on
Commit
7b04f2c
·
1 Parent(s): d7dd7d6

try mounting

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -2
  2. Makefile +2 -0
Dockerfile CHANGED
@@ -1,11 +1,12 @@
1
  # syntax=docker/dockerfile:1.4-labs
2
  FROM ubuntu:24.04 as base
3
  ENV DEBIAN_FRONTEND=noninteractive
4
- ENV ROOTFS=/tmp/restore
5
  ARG SSH_HOST
6
  ARG SSH_USER
7
  ARG SSH_PATH=/var/tmp/restic
8
 
 
9
  RUN apt update && apt install -yq wget bzip2 make time sshfs fuse3 && \
10
  wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash && \
11
  autorestic --version && \
@@ -17,7 +18,7 @@ WORKDIR /var/tmp/restic
17
  RUN --security=insecure --mount=type=ssh sshfs -v -o auto_cache,reconnect,transform_symlinks,follow_symlinks ${SSH_USER}@${SSH_HOST}:${SSH_PATH} /var/tmp/restic && \
18
  cd /var/tmp/restic && \
19
  ls -la && \
20
- make restore && rm -rf /var/tmp/restic/*
21
 
22
  WORKDIR ${ROOTFS}
23
  RUN --security=insecure \
 
1
  # syntax=docker/dockerfile:1.4-labs
2
  FROM ubuntu:24.04 as base
3
  ENV DEBIAN_FRONTEND=noninteractive
4
+ ARG ROOTFS=/tmp/restore
5
  ARG SSH_HOST
6
  ARG SSH_USER
7
  ARG SSH_PATH=/var/tmp/restic
8
 
9
+ RUN echo $ROOTFS ; exit 1
10
  RUN apt update && apt install -yq wget bzip2 make time sshfs fuse3 && \
11
  wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash && \
12
  autorestic --version && \
 
18
  RUN --security=insecure --mount=type=ssh sshfs -v -o auto_cache,reconnect,transform_symlinks,follow_symlinks ${SSH_USER}@${SSH_HOST}:${SSH_PATH} /var/tmp/restic && \
19
  cd /var/tmp/restic && \
20
  ls -la && \
21
+ make restore
22
 
23
  WORKDIR ${ROOTFS}
24
  RUN --security=insecure \
Makefile CHANGED
@@ -47,6 +47,7 @@ build:
47
  --volume $(CURRENT_DIR):/tmp/work \
48
  --volume "$${HOME}/.docker:/root/.docker:ro" \
49
  --volume $(SSH_AUTH_SOCK):$(SSH_AUTH_SOCK) \
 
50
  --entrypoint buildctl-daemonless.sh \
51
  moby/buildkit:master \
52
  build \
@@ -56,5 +57,6 @@ build:
56
  --allow security.insecure \
57
  --opt build-arg:SSH_USER=$(SSH_USER) \
58
  --opt build-arg:SSH_HOST=$(SSH_HOST) \
 
59
  --output type=image,name=$(IMAGE_PROVIDER)/$(IMAGE),push=true \
60
  --ssh default=$(SSH_AUTH_SOCK)
 
47
  --volume $(CURRENT_DIR):/tmp/work \
48
  --volume "$${HOME}/.docker:/root/.docker:ro" \
49
  --volume $(SSH_AUTH_SOCK):$(SSH_AUTH_SOCK) \
50
+ --volume $(RESTORE_DST):$(RESTORE_DST) \
51
  --entrypoint buildctl-daemonless.sh \
52
  moby/buildkit:master \
53
  build \
 
57
  --allow security.insecure \
58
  --opt build-arg:SSH_USER=$(SSH_USER) \
59
  --opt build-arg:SSH_HOST=$(SSH_HOST) \
60
+ --opt build-arg:ROOTFS=$(RESTORE_DST) \
61
  --output type=image,name=$(IMAGE_PROVIDER)/$(IMAGE),push=true \
62
  --ssh default=$(SSH_AUTH_SOCK)