Compare commits
1 Commits
8b1bbbf06c
...
532c2a86f0
Author | SHA1 | Date | |
---|---|---|---|
532c2a86f0 |
13
Dockerfile
13
Dockerfile
@ -1,8 +1,15 @@
|
|||||||
FROM ubuntu:19.10
|
FROM ubuntu:19.10
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y curl
|
ARG BUILDPLATFORM
|
||||||
RUN curl -o megacmd-xUbuntu_19.10_amd64.deb https://mega.nz/linux/MEGAsync/xUbuntu_19.10/amd64/megacmd-xUbuntu_19.10_amd64.deb
|
ARG TARGETPLATFORM
|
||||||
RUN apt install -y ./megacmd-xUbuntu_19.10_amd64.deb
|
ARG TARGETOS
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y curl ca-certificates
|
||||||
|
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 /
|
ADD entrypoint.sh /
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
16
Makefile
16
Makefile
@ -1,6 +1,9 @@
|
|||||||
.DEFAULT_GOAL := default
|
.DEFAULT_GOAL := default
|
||||||
|
|
||||||
IMAGE ?= docker.cluster.fun/averagemarcus/megasync:latest
|
IMAGE ?= docker.cluster.fun/averagemarcus/megasync:latest
|
||||||
|
PLATFORMS ?= linux/amd64,linux/arm/v7
|
||||||
|
|
||||||
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
|
||||||
.PHONY: test # Run all tests, linting and format checks
|
.PHONY: test # Run all tests, linting and format checks
|
||||||
test: lint check-format run-tests
|
test: lint check-format run-tests
|
||||||
@ -31,11 +34,20 @@ build: lint check-format fetch-deps
|
|||||||
|
|
||||||
.PHONY: docker-build # Build the docker image
|
.PHONY: docker-build # Build the docker image
|
||||||
docker-build:
|
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
|
.PHONY: docker-publish # Push the docker image to the remote registry
|
||||||
docker-publish:
|
docker-publish:
|
||||||
@docker push $(IMAGE)
|
@docker buildx create --use --name=crossplat --node=crossplat && \
|
||||||
|
docker buildx build \
|
||||||
|
--platform $(PLATFORMS) \
|
||||||
|
--output "type=image,push=true" \
|
||||||
|
--tag $(IMAGE) \
|
||||||
|
.
|
||||||
|
|
||||||
.PHONY: run # Run the application
|
.PHONY: run # Run the application
|
||||||
run:
|
run:
|
||||||
|
Loading…
Reference in New Issue
Block a user