Compare commits
1 Commits
b20309ddb2
...
8d0b6e3207
Author | SHA1 | Date | |
---|---|---|---|
8d0b6e3207 |
16
Dockerfile
16
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} ubuntu:19.10
|
FROM --platform=${TARGETPLATFORM:-linux/amd64} ubuntu:19.10
|
||||||
|
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
@ -8,22 +8,18 @@ ARG TARGETARCH
|
|||||||
RUN apt-get update && apt-get install -y curl ca-certificates
|
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" && \
|
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 && \
|
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
|
curl -k -o megacmd.deb $URL
|
||||||
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
RUN apt install -y ./megacmd.deb
|
||||||
|
|
||||||
ADD entrypoint.sh /
|
ADD entrypoint.sh /
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} ubuntu:19.10
|
|
||||||
USER mega
|
USER mega
|
||||||
WORKDIR /home/mega
|
|
||||||
|
|
||||||
COPY --from=builder /etc/sudoers /etc/sudoers
|
WORKDIR /home/mega
|
||||||
COPY --from=builder /entrypoint.sh /entrypoint.sh
|
|
||||||
COPY --from=builder /megacmd.deb /megacmd.deb
|
|
||||||
RUN apt install -y ./megacmd.deb
|
|
||||||
|
|
||||||
ENV PASSWORD=
|
ENV PASSWORD=
|
||||||
ENV EMAIL=
|
ENV EMAIL=
|
||||||
|
|
||||||
CMD /entrypoint.sh
|
CMD /entrypoint.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user