help building a docker image
#1
Hi All, 

I have a rock64 running ayufan 0.5.15-136 with OMV 3. Works great so thanks to the pine64 team and the community - especially ayufan!

I am trying to get a docker image/container to work - https://github.com/haugene/docker-transmission-openvpn

This is a useful docker image that combines transmission and openvpn together but its not build for armhf so it needs to be built manually.

There is a armhf dockerfile that can be used to build an image for armhf and I have been able to use 'docker build' command to build the image on my rock64 but it doesn't work. I'm a total noob with docker so i was hoping to get some help.

I think the issue is the first command in the docker file - FROM resin/rpi-raspbianConfusedtretch

I think i need to change this with something that works for rock64. 

Any ideas?

thanks jata
  Reply
#2
I think I have worked out that I need to specify the correct base image. 

So my question is really what is the base image that I should use in a dockerfile when building an docker image for rock64 with Linux (0.5.15-136)?
  Reply
#3
(03-24-2018, 02:13 AM)jata Wrote: I think the issue is the first command in the docker file - FROM resin/rpi-raspbianConfusedtretch

I think i need to change this with something that works for rock64. 

Can you use the Dockerfile.apline in that repo instead? Alpine is a heck of a lot less overhead for the docker image, and may 'just work', or just need a minor change to arm64v8/alpine:3.7 for the FROM line, or perhaps arm32v6/alpine:3.7... that also works with a raspberry pi zero w Wink
  Reply
#4
thanks for the help - i have now tried a few different FROM options but none have been successful yet.

I have tried debian:jessie but even that didn't work so i'm getting a but stuck.

Anyone else have some ideas for a base image for docker that will work on my jessie / armhf rock64?
  Reply
#5
Below is a version of the alpine dockerfile that built on the rock64 for me. If it works as intended I don't know, but I fixed the bugs the original author left...

Basically, changed the from line, split the next multiple line mess into chunks whilst diagnosing the actual fault so caching worked properly, so left them that way, added the ca-certificates openssl packages (and wget, as it needs to be reinstalled to work properly after ca-certificates), changed the dockerize url to armhf, that's pretty much it.

See how you go with that...

Code:
FROM arm64v8/alpine:3.7
# MAINTAINER Kristian Haugene

VOLUME /data
VOLUME /config

RUN echo "Installing package dependencies"\
   && echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
   && apk --no-cache add dumb-init ip6tables ufw@testing openvpn shadow transmission-daemon ca-certificates openssl wget \
   && update-ca-certificates

ENV DOCKERIZE_VERSION=v0.6.0
RUN echo "Install dockerize ${DOCKERIZE_VERSION}" \
    && wget -qO- https://github.com/jwilder/dockerize/releases/download/${DOCKERIZE_VERSION}/dockerize-linux-armhf-${DOCKERIZE_VERSION}.tar.gz \
    | tar xz -C /usr/bin && mkdir -p /opt/transmission-ui/combustion-release /opt/transmission-ui/kettu

RUN echo "Install Combustion" \
   && wget -qO- https://github.com/Secretmapper/combustion/archive/release.tar.gz | tar xz -C /opt/transmission-ui
   && usermod -G users abc

ADD openvpn/ /etc/openvpn/
ADD transmission/ /etc/transmission/

ENV OPENVPN_USERNAME=**None** \
   OPENVPN_PASSWORD=**None** \
   OPENVPN_PROVIDER=**None** \
   TRANSMISSION_ALT_SPEED_DOWN=50 \
   TRANSMISSION_ALT_SPEED_ENABLED=false \
   TRANSMISSION_ALT_SPEED_TIME_BEGIN=540 \
   TRANSMISSION_ALT_SPEED_TIME_DAY=127 \
   TRANSMISSION_ALT_SPEED_TIME_ENABLED=false \
   TRANSMISSION_ALT_SPEED_TIME_END=1020 \
   TRANSMISSION_ALT_SPEED_UP=50 \
   TRANSMISSION_BIND_ADDRESS_IPV4=0.0.0.0 \
   TRANSMISSION_BIND_ADDRESS_IPV6=:: \
   TRANSMISSION_BLOCKLIST_ENABLED=false \
   TRANSMISSION_BLOCKLIST_URL=http://www.example.com/blocklist \
   TRANSMISSION_CACHE_SIZE_MB=4 \
   TRANSMISSION_DHT_ENABLED=true \
   TRANSMISSION_DOWNLOAD_DIR=/data/completed \
   TRANSMISSION_DOWNLOAD_LIMIT=100 \
   TRANSMISSION_DOWNLOAD_LIMIT_ENABLED=0 \
   TRANSMISSION_DOWNLOAD_QUEUE_ENABLED=true \
   TRANSMISSION_DOWNLOAD_QUEUE_SIZE=5 \

RUN echo "Install kettu" \
   && wget -qO- https://github.com/endor/kettu/archive/master.tar.gz | tar xz -C /opt/transmission-ui/kettu

RUN rm -rf /tmp/* /var/tmp/* \
   && groupmod -g 1000 users \
   && useradd -u 911 -U -d /config -s /bin/false abc \
   TRANSMISSION_ENCRYPTION=1 \
   TRANSMISSION_IDLE_SEEDING_LIMIT=30 \
   TRANSMISSION_IDLE_SEEDING_LIMIT_ENABLED=false \
   TRANSMISSION_INCOMPLETE_DIR=/data/incomplete \
   TRANSMISSION_INCOMPLETE_DIR_ENABLED=true \
   TRANSMISSION_LPD_ENABLED=false \
   TRANSMISSION_MAX_PEERS_GLOBAL=200 \
   TRANSMISSION_MESSAGE_LEVEL=2 \
   TRANSMISSION_PEER_CONGESTION_ALGORITHM= \
   TRANSMISSION_PEER_ID_TTL_HOURS=6 \
   TRANSMISSION_PEER_LIMIT_GLOBAL=200 \
   TRANSMISSION_PEER_LIMIT_PER_TORRENT=50 \
   TRANSMISSION_PEER_PORT=51413 \
   TRANSMISSION_PEER_PORT_RANDOM_HIGH=65535 \
   TRANSMISSION_PEER_PORT_RANDOM_LOW=49152 \
   TRANSMISSION_PEER_PORT_RANDOM_ON_START=false \
   TRANSMISSION_PEER_SOCKET_TOS=default \
   TRANSMISSION_PEX_ENABLED=true \
   TRANSMISSION_PORT_FORWARDING_ENABLED=false \
   TRANSMISSION_PREALLOCATION=1 \
   TRANSMISSION_PREFETCH_ENABLED=1 \
   TRANSMISSION_QUEUE_STALLED_ENABLED=true \
   TRANSMISSION_QUEUE_STALLED_MINUTES=30 \
   TRANSMISSION_RATIO_LIMIT=2 \
   TRANSMISSION_RATIO_LIMIT_ENABLED=false \
   TRANSMISSION_RENAME_PARTIAL_FILES=true \
   TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=false \
   TRANSMISSION_RPC_BIND_ADDRESS=0.0.0.0 \
   TRANSMISSION_RPC_ENABLED=true \
   TRANSMISSION_RPC_HOST_WHITELIST= \
   TRANSMISSION_RPC_HOST_WHITELIST_ENABLED=true \
   TRANSMISSION_RPC_PASSWORD=password \
   TRANSMISSION_RPC_PORT=9091 \
   TRANSMISSION_RPC_URL=/transmission/ \
   TRANSMISSION_RPC_USERNAME=username \
   TRANSMISSION_RPC_WHITELIST=127.0.0.1 \
   TRANSMISSION_RPC_WHITELIST_ENABLED=false \
   TRANSMISSION_SCRAPE_PAUSED_TORRENTS_ENABLED=true \
   TRANSMISSION_SCRIPT_TORRENT_DONE_ENABLED=false \
   TRANSMISSION_SCRIPT_TORRENT_DONE_FILENAME= \
   TRANSMISSION_SEED_QUEUE_ENABLED=false \
   TRANSMISSION_SEED_QUEUE_SIZE=10 \
   TRANSMISSION_SPEED_LIMIT_DOWN=100 \
   TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED=false \
   TRANSMISSION_SPEED_LIMIT_UP=100 \
   TRANSMISSION_SPEED_LIMIT_UP_ENABLED=false \
   TRANSMISSION_START_ADDED_TORRENTS=true \
   TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES=false \
   TRANSMISSION_UMASK=2 \
   TRANSMISSION_UPLOAD_LIMIT=100 \
   TRANSMISSION_UPLOAD_LIMIT_ENABLED=0 \
   TRANSMISSION_UPLOAD_SLOTS_PER_TORRENT=14 \
   TRANSMISSION_SEED_QUEUE_ENABLED=false \
   TRANSMISSION_SEED_QUEUE_SIZE=10 \
   TRANSMISSION_SPEED_LIMIT_DOWN=100 \
   TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED=false \
   TRANSMISSION_SPEED_LIMIT_UP=100 \
   TRANSMISSION_SPEED_LIMIT_UP_ENABLED=false \
   TRANSMISSION_START_ADDED_TORRENTS=true \
   TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES=false \
   TRANSMISSION_UMASK=2 \
   TRANSMISSION_UPLOAD_LIMIT=100 \
   TRANSMISSION_UPLOAD_LIMIT_ENABLED=0 \
   TRANSMISSION_UPLOAD_SLOTS_PER_TORRENT=14 \
   TRANSMISSION_UTP_ENABLED=true \
   TRANSMISSION_WATCH_DIR=/data/watch \
   TRANSMISSION_WATCH_DIR_ENABLED=true \
   TRANSMISSION_HOME=/data/transmission-home \
   ENABLE_UFW=false \
   TRANSMISSION_WEB_UI= \
   PUID= \
   PGID= \
   TRANSMISSION_WEB_HOME= \
   DROP_DEFAULT_ROUTE=

# Expose port and run
EXPOSE 9091
CMD ["dumb-init", "/etc/openvpn/start.sh"]
  Reply
#6
I'm trying to install the same image but can't get it to install

Code:
FROM arm64v8/alpine:3.7

VOLUME /data
VOLUME /config

ARG DOCKERIZE_ARCH=armhf

ENV DOCKERIZE_VERSION=v0.6.0

RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk --no-cache add bash dumb-init ip6tables ufw@testing openvpn shadow transmission-daemon transmission-cli curl jq \
&& echo "Install dockerize $DOCKERIZE_VERSION ($DOCKERIZE_ARCH)" \
&& wget -qO- https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-$DOCKERIZE_ARCH-$DOCKERIZE_VERSION.tar.gz | tar xz -C /usr/bin \
&& mkdir -p /opt/transmission-ui \
&& echo "Install Combustion" \
&& wget -qO- https://github.com/Secretmapper/combustion/archive/release.tar.gz | tar xz -C /opt/transmission-ui \
&& echo "Install kettu" \
&& wget -qO- https://github.com/endor/kettu/archive/master.tar.gz | tar xz -C /opt/transmission-ui \
&& mv /opt/transmission-ui/kettu-master /opt/transmission-ui/kettu \
&& echo "Install Transmission-Web-Control" \
&& mkdir /opt/transmission-ui/transmission-web-control \
&& curl -sL `curl -s https://api.github.com/repos/ronggang/transmission-web-control/releases/latest | jq --raw-output '.tarball_url'` | tar -C /opt/transmission-ui/transmission-web-control/ --strip-components=2 -xz \
&& ln -s /usr/share/transmission/web/style /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/images /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/javascript /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
&& rm -rf /tmp/* /var/tmp/* \
&& groupmod -g 1000 users \
&& useradd -u 911 -U -d /config -s /bin/false abc \
&& usermod -G users abc

ADD openvpn/ /etc/openvpn/
ADD transmission/ /etc/transmission/
plus all the environmental stuff, but it doesn't even get there.
Instead I'm getting this:
Code:
Step 7/11 : ADD openvpn/ /etc/openvpn/
ADD failed: stat /var/lib/docker/tmp/docker-builder012776508/openvpn: no such file or directory

Any ideas?
Thanks!
  Reply
#7
(07-11-2019, 10:47 PM)bjbjb Wrote: I'm trying to install the same image but can't get it to install

Code:
FROM arm64v8/alpine:3.7

VOLUME /data
VOLUME /config

ARG DOCKERIZE_ARCH=armhf

ENV DOCKERIZE_VERSION=v0.6.0

RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk --no-cache add bash dumb-init ip6tables ufw@testing openvpn shadow transmission-daemon transmission-cli curl jq \
&& echo "Install dockerize $DOCKERIZE_VERSION ($DOCKERIZE_ARCH)" \
&& wget -qO- https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-$DOCKERIZE_ARCH-$DOCKERIZE_VERSION.tar.gz | tar xz -C /usr/bin \
&& mkdir -p /opt/transmission-ui \
&& echo "Install Combustion" \
&& wget -qO- https://github.com/Secretmapper/combustion/archive/release.tar.gz | tar xz -C /opt/transmission-ui \
&& echo "Install kettu" \
&& wget -qO- https://github.com/endor/kettu/archive/master.tar.gz | tar xz -C /opt/transmission-ui \
&& mv /opt/transmission-ui/kettu-master /opt/transmission-ui/kettu \
&& echo "Install Transmission-Web-Control" \
&& mkdir /opt/transmission-ui/transmission-web-control \
&& curl -sL `curl -s https://api.github.com/repos/ronggang/transmission-web-control/releases/latest | jq --raw-output '.tarball_url'` | tar -C /opt/transmission-ui/transmission-web-control/ --strip-components=2 -xz \
&& ln -s /usr/share/transmission/web/style /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/images /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/javascript /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
&& rm -rf /tmp/* /var/tmp/* \
&& groupmod -g 1000 users \
&& useradd -u 911 -U -d /config -s /bin/false abc \
&& usermod -G users abc

ADD openvpn/ /etc/openvpn/
ADD transmission/ /etc/transmission/
plus all the environmental stuff, but it doesn't even get there.
Instead I'm getting this:
Code:
Step 7/11 : ADD openvpn/ /etc/openvpn/
ADD failed: stat /var/lib/docker/tmp/docker-builder012776508/openvpn: no such file or directory

Any ideas?
Thanks!

This is just a guess based on this:

https://github.com/docker/for-linux/issu...-455507788


Maybe you have to run the script from the same directory the openvpn/ directory resides in.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Smile First Lakka image for Rock64! Luke 47 82,484 09-01-2024, 06:05 AM
Last Post: RaymondDay
  NextCloudPi image for Rock64, NC version 13.0.2. nachoparker 11 26,953 03-15-2021, 02:59 PM
Last Post: kiriakos
  Remedial Docker lessons cjyar 2 4,454 12-19-2019, 05:38 AM
Last Post: lbruno
  Release 0.9.14 Ubuntu Mate desktop, LXDE, OMV, Docker CE (container) Luke 1 4,533 09-19-2019, 07:00 AM
Last Post: Malmgren
  Upgrading Debian Stretch image to Buster cosuhi 2 5,268 08-27-2019, 02:42 AM
Last Post: Malmgren
  Underclocking the Rock64 (latest stable linux image) va88 2 4,819 08-07-2019, 05:39 PM
Last Post: evilbunny
  Arch Linux minimal image w/ full HDMI output support hiccupstix 1 4,014 11-01-2018, 08:33 AM
Last Post: danboid
  Tutorial How to write a image in the eMMc card without USB adaptor or serial cable gedas07 2 4,314 08-29-2018, 10:08 AM
Last Post: gedas07
  Docker Mssql Riverman 5 7,401 07-09-2018, 11:26 PM
Last Post: pfeerick
  docker contaainer error on "docker login" edwinbmiller 0 1,800 06-18-2018, 10:08 AM
Last Post: edwinbmiller

Forum Jump:


Users browsing this thread: 1 Guest(s)