Skip to content

Commit

Permalink
pre-install required packages
Browse files Browse the repository at this point in the history
Signed-off-by: Dweb Fan <[email protected]>
  • Loading branch information
dwebfan committed Jun 2, 2024
1 parent 4593d89 commit 5c12a16
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions dockerfiles/dev-image
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions dockerfiles/dev-image-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM lomorage/lomo-backup:build-stage0 as initial

FROM ubuntu:22.04

COPY --from=initial / /

0 comments on commit 5c12a16

Please sign in to comment.