Compare commits
7 Commits
b7db53d93c
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
75fe5da1d8 | ||
68a14fa619 | |||
cf97345a0c | |||
8a2944d59b | |||
b7c5a18c12 | |||
da48480ab8 | |||
f6a2e8277f |
13
Dockerfile
13
Dockerfile
@@ -1,16 +1,17 @@
|
||||
FROM ubuntu:19.10
|
||||
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
RUN curl -o megacmd-xUbuntu_19.10_amd64.deb https://mega.nz/linux/MEGAsync/xUbuntu_19.10/amd64/megacmd-xUbuntu_19.10_amd64.deb
|
||||
RUN apt install -y ./megacmd-xUbuntu_19.10_amd64.deb
|
||||
RUN apt-get update && apt-get install -y curl ca-certificates
|
||||
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
RUN curl -k -o /megacmd.deb https://mega.nz/linux/MEGAsync/xUbuntu_19.10/amd64/megacmd-xUbuntu_19.10_amd64.deb
|
||||
RUN apt install -y ./megacmd.deb
|
||||
|
||||
ADD entrypoint.sh /
|
||||
|
||||
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER mega
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /home/mega
|
||||
|
||||
USER mega
|
||||
|
||||
ENV PASSWORD=
|
||||
ENV EMAIL=
|
||||
|
||||
|
18
Dockerfile.armhf
Normal file
18
Dockerfile.armhf
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM ubuntu:19.10
|
||||
|
||||
RUN apt-get update && apt-get install -y curl ca-certificates
|
||||
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
RUN curl -k -o /megacmd.deb https://mega.nz/linux/MEGAsync/Raspbian_10.0/armhf/megacmd-Raspbian_10.0_armhf.deb
|
||||
RUN apt install -y ./megacmd.deb
|
||||
|
||||
ADD entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /home/mega
|
||||
|
||||
USER mega
|
||||
|
||||
ENV PASSWORD=
|
||||
ENV EMAIL=
|
||||
|
||||
CMD /entrypoint.sh
|
24
Makefile
24
Makefile
@@ -2,6 +2,8 @@
|
||||
|
||||
IMAGE ?= docker.cluster.fun/averagemarcus/megasync:latest
|
||||
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
|
||||
.PHONY: test # Run all tests, linting and format checks
|
||||
test: lint check-format run-tests
|
||||
|
||||
@@ -31,11 +33,29 @@ build: lint check-format fetch-deps
|
||||
|
||||
.PHONY: docker-build # Build the docker image
|
||||
docker-build:
|
||||
@docker build -t $(IMAGE) .
|
||||
@docker buildx create --use --name=crossplat --node=crossplat && \
|
||||
docker buildx build \
|
||||
--output "type=docker,push=false" \
|
||||
--tag $(IMAGE) \
|
||||
.
|
||||
|
||||
.PHONY: docker-publish # Push the docker image to the remote registry
|
||||
docker-publish:
|
||||
@docker push $(IMAGE)
|
||||
@docker buildx create --use --name=crossplat --node=crossplat && \
|
||||
docker buildx build \
|
||||
--output "type=image,push=true" \
|
||||
--tag $(IMAGE) \
|
||||
.
|
||||
|
||||
.PHONY: docker-publish-arm # Build and push the armhf image (needs to be built on ARM hardware)
|
||||
docker-publish-arm:
|
||||
@docker buildx create --use --name=crossplat --node=crossplat && \
|
||||
docker buildx build \
|
||||
--file Dockerfile.armhf \
|
||||
--platform linux/arm/7 \
|
||||
--output "type=image,push=true" \
|
||||
--tag $(IMAGE)-armhf \
|
||||
.
|
||||
|
||||
.PHONY: run # Run the application
|
||||
run:
|
||||
|
@@ -37,7 +37,7 @@ make build
|
||||
|
||||
## Contributing
|
||||
|
||||
If you find a bug or have an idea for a new feature please [raise an issue](/AverageMarcus/megasync/issues/new) to discuss it.
|
||||
If you find a bug or have an idea for a new feature please raise an issue to discuss it.
|
||||
|
||||
Pull requests are welcomed but please try and follow similar code style as the rest of the project and ensure all tests and code checkers are passing.
|
||||
|
||||
|
Reference in New Issue
Block a user