diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 72bcb34..633d7b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,12 +40,10 @@ jobs: GOFLAGS: "-buildvcs=false" WORKDIR: /go/src/github.com/lomorage/lomo-backup steps: - - run: apt-get update && apt-get install -y git - uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - run: apt install -y tree rsync - run: cd test/data; find . | while read -r file; do git log -1 --format="%ad" --date=iso "$file" | xargs -t -I{} touch -d {} "$file"; done - run: mkdir -p $WORKDIR; rsync -avz * $WORKDIR/; cd $WORKDIR; tree --si -D test/data/ - run: cd $WORKDIR; make install diff --git a/Makefile b/Makefile index aae9e42..b4da855 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,9 @@ localstack-tarball: gzip localstack_3.4.0.tar dev-container: - docker build --tag "lomorage/lomo-backup:build-stage1" -f dockerfiles/dev-image . - docker build --tag "lomorage/lomo-backup:build-stage2" -f dockerfiles/dev-image-load . - docker rm -f lomo-backup-build - docker run --name lomo-backup-build --privileged --net host -it "lomorage/lomo-backup:build-stage2" hostname - docker commit lomo-backup-build lomorage/lomo-backup:1.0 + docker build --tag "lomorage/lomo-backup:build-stage0" -f dockerfiles/dev-image . + docker build --tag lomorage/lomo-backup:1.0 -f dockerfiles/dev-image-merge . + dev: docker build \ diff --git a/README.md b/README.md index dcd66ae..c14a5c1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Previously we want to implement a peer backup solution which allows me to back u 3. run consistency check monthly and send me alert if cloud version is different from my local version 4. support multi sites backup - As I have local duplicate backup as well, and most time I access photos and videos from local service, so I seldom visit the cloud backup version. # Cost Analysis using current backup solution diff --git a/dockerfiles/dev-image b/dockerfiles/dev-image index 8b8e608..ca7ed88 100644 --- a/dockerfiles/dev-image +++ b/dockerfiles/dev-image @@ -16,3 +16,8 @@ RUN apt-get -yqq update && apt-get install -yq docker-ce && apt-get clean autocl RUN curl -fsSL https://go.dev/dl/go1.21.0.linux-amd64.tar.gz | tar xz -C /usr/local RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 + +RUN curl -Lo localstack-cli-3.4.0-linux-amd64-onefile.tar.gz \ + https://github.com/localstack/localstack-cli/releases/download/v3.4.0/localstack-cli-3.4.0-linux-amd64-onefile.tar.gz; \ + sudo tar xvzf localstack-cli-3.4.0-linux-amd64-onefile.tar.gz -C /usr/local/bin; \ + rm localstack-cli-3.4.0-linux-amd64-onefile.tar.gz \ No newline at end of file diff --git a/dockerfiles/dev-image-merge b/dockerfiles/dev-image-merge new file mode 100644 index 0000000..f8c410a --- /dev/null +++ b/dockerfiles/dev-image-merge @@ -0,0 +1,5 @@ +FROM lomorage/lomo-backup:build-stage0 as initial + +FROM ubuntu:22.04 + +COPY --from=initial / / \ No newline at end of file