Compare commits
1 Commits
master
...
532c2a86f0
| Author | SHA1 | Date | |
|---|---|---|---|
| 532c2a86f0 |
15
Dockerfile
15
Dockerfile
@@ -1,17 +1,24 @@
|
||||
FROM ubuntu:19.10
|
||||
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
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 export URL="https://mega.nz/linux/MEGAsync/Raspbian_10.0/armhf/megacmd-Raspbian_10.0_armhf.deb" && \
|
||||
if [ "${TARGETARCH}" = "amd64" ] ; then export URL="https://mega.nz/linux/MEGAsync/xUbuntu_19.10/amd64/megacmd-xUbuntu_19.10_amd64.deb" ; fi && \
|
||||
curl -k -o megacmd.deb $URL
|
||||
RUN apt install -y ./megacmd.deb
|
||||
|
||||
ADD entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /home/mega
|
||||
|
||||
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER mega
|
||||
|
||||
WORKDIR /home/mega
|
||||
|
||||
ENV PASSWORD=
|
||||
ENV EMAIL=
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
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
|
||||
12
Makefile
12
Makefile
@@ -1,6 +1,7 @@
|
||||
.DEFAULT_GOAL := default
|
||||
|
||||
IMAGE ?= docker.cluster.fun/averagemarcus/megasync:latest
|
||||
PLATFORMS ?= linux/amd64,linux/arm/v7
|
||||
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
|
||||
@@ -43,20 +44,11 @@ docker-build:
|
||||
docker-publish:
|
||||
@docker buildx create --use --name=crossplat --node=crossplat && \
|
||||
docker buildx build \
|
||||
--platform $(PLATFORMS) \
|
||||
--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:
|
||||
@echo "⚠️ 'run' unimplemented"
|
||||
|
||||
@@ -37,7 +37,7 @@ make build
|
||||
|
||||
## Contributing
|
||||
|
||||
If you find a bug or have an idea for a new feature please raise an issue to discuss it.
|
||||
If you find a bug or have an idea for a new feature please [raise an issue](/AverageMarcus/megasync/issues/new) 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