Docker on a Pi

Abarbarian

Acruncher
Joined
Sep 30, 2005
Messages
11,023
Reaction score
1,223
For while now I have had an itch to host a Ghost blog running from a Pi located at home.
So have finally made a start.

I am attempting to run Docker on a Pi2 with a ghost instance running in a docker container.The Ghost will be accessible from any pc connected to the internet. If I am successful I think the Pi and my broadband will cope with the/any extra traffic my blog may attract.

I'll assume that you are all familiar with the Raspberry Pi. If not have a read at the link,

https://www.raspberrypi.org/

So what is Docker,

https://docs.docker.com/engine/understanding-docker/

At its core, Docker provides a way to run almost any application securely isolated in a container. The isolation and security allow you to run many containers simultaneously on your host. The lightweight nature of containers, which run without the extra load of a hypervisor, means you can get more out of your hardware.

Surrounding the container is tooling and a platform which can help you in several ways:

Now you can install a os manually to the Pi and then manually install Docker but there is an easier way. The Docker Pirates have created a very light weight os that already has Docker and associated tools already installed and ready to rock.
In the first link there are instructions for installing HypriotOS v.10.0 you can alter the instructions slightly and install the latest version 1.0.1 from the second link.

http://blog.hypriot.com/post/releasing-HypriotOS-1-0/

https://github.com/hypriot/image-builder-rpi/releases

Today we proudly present our 1.0.0 release of HypriotOS – a container OS that takes you from Zero to Docker within 5 Minutes only, on any device of the complete Raspberry Pi family.

I am a tad wary of claims made on developers sites however on this occasion the claims are true. Following the simple instructions and using the hypriot/flash tool you do get a working os with a working Docker in a very short time. Time taken depends on your broadband speed and how fast you can read and type/copy.paste.

One of the attractions of Docker is that loads of folk have already made containers with almost all the commonly used programs. Obtaining one to suit your needs is as simple as searching the Docker Hub. If you search the Hub you need to search for arm specific images. Try " rpi/ " in the search bar and you will find 1977 different Pi compatible images.

I looked for a ghost and found this,

https://hub.docker.com/r/de13/rpi-ghost/

Once you have found your choice how do you get it on to your Pi ? Simple, you use the "docker pull " command as below.

Code:
docker pull de13/rpi-ghost

So did it install on my Pi ?

breakfast.gif
 
Nice one @Abarbarian!

I only started using Docker about 6 months ago, but I've not looked back since converting apps over to it. For example, I use Plex to stream media in our house and it took just a few minutes to get a docker image and deploy it. Minimal configuration and ready to go!
 
Darn it I hate reading success stories when I am struggling :D

So did Ghost install as a Docker container ? I know you are all waiting with bated breath.

Nope it did not seems I have a broken pipe whatever that is.

Code:
pirate@black-pearl in ~
$ docker pull de13/rpi-ghost

Using default tag: latest
latest: Pulling from de13/rpi-ghost
991507d4dcc6: Already exists
2ad44321f88a: Already exists
2f39bd897657: Already exists
a3ed95caeb02: Already exists
31a9a074ee45: Already exists
51e4e74b1e26: Already exists
3ad9b37a058b: Already exists
cf4635ff0f02: Already exists
44e8ce905b87: Already exists
94984e8a0966: Already exists
a2fccbbb9450: Extracting 61.83 MB/89.87 MB
d472540e37e5: Download complete
Write failed: Broken pipe

After sleeping on the problem I am guessing that the problem lies with the Ghost download and install. As everything ran fine up to extracting the 89.87 MB component which I am assuming to be the Ghost part.

Yesterday however I was in a lets see what happens if mode. looking at the Docker images I had on the pc showed me that I had a base os image,

Code:
pirate@black-pearl in ~
$ docker images

REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
resin/rpi-raspbian          latest              1b1ef0181c7c        5 hours ago         117.2 MB
pypi/lychee                 latest              b290b81f98f1        10 months ago       688.7 MB
hypriot/rpi-busybox-httpd   latest              fbd9685c5ffc        15 months ago       2.156 MB

Now I had looked in the Docker file for "de13/rpi-ghost" which I was trying to install and saw that they were using a different base image. If I swapped the base images would that make a difference ?
Made a folder on the Pi cd'd into it, used the " touch " command to make a Dockerfile, copied the "config.js" file from"de13/rpi-ghost" into the folder and then copied and altered the base image line of the "de13/rpi-ghost" original file.This gave me two usable files in my new folder.

Code:
pirate@black-pearl in ~/ghost1
$ ls
config.js  Dockerfile

Lets see if I have made the difference.

Code:
pirate@black-pearl in ~/ghost1
$ docker build -t pirate/ghost1

"docker build" requires exactly 1 argument(s).
See 'docker build --help'.

Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Running the build command threw up the above warning. Drat ! what was wrong ? It seems I needed a " full stop " like so

Code:
pirate@black-pearl in ~/ghost1
$ docker build -t pirate/ghost1 .

Sending build context to Docker daemon 7.168 kB
Step 1 : FROM resin/rpi-raspbian
---> 1b1ef0181c7c
Step 2 : MAINTAINER Saphoooo <[email protected]>
---> Running in 7c2a5fa98203
---> 9c0b8164654a
Removing intermediate container 7c2a5fa98203
Step 3 : RUN apt-get update && apt-get install -y unzip
---> Running in dbb2d417bf15
Get:1 http://archive.raspbian.org jessie InRelease [14.9 kB]
Get:2 http://archive.raspberrypi.org jessie InRelease [13.2 kB]
Ign http://resin-packages.s3-website-us-east-1.amazonaws.com resin InRelease
Get:3 http://resin-packages.s3-website-us-east-1.amazonaws.com resin Release.gpg [801 B]
Get:4 http://archive.raspbian.org jessie/main armhf Packages [12.5 MB]
Get:5 http://resin-packages.s3-website-us-east-1.amazonaws.com resin Release [2258 B]
Get:6 http://archive.raspberrypi.org jessie/main armhf Packages [146 kB]
Get:7 http://resin-packages.s3-website-us-east-1.amazonaws.com resin/main armhf Packages [2633 B]
Get:8 http://archive.raspbian.org jessie/contrib armhf Packages [42.6 kB]
Get:9 http://archive.raspbian.org jessie/non-free armhf Packages [83.5 kB]
Get:10 http://archive.raspbian.org jessie/rpi armhf Packages [1297 B]
Get:11 http://archive.raspbian.org jessie/firmware armhf Packages [1203 B]
Fetched 12.8 MB in 1min 33s (137 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Suggested packages:
  zip
The following NEW packages will be installed:
  unzip
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 142 kB of archives.
After this operation, 394 kB of additional disk space will be used.
Get:1 http://archive.raspbian.org/raspbian/ jessie/main unzip armhf 6.0-16+deb8u2 [142 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 142 kB in 0s (148 kB/s)
Selecting previously unselected package unzip.
(Reading database ... 8243 files and directories currently installed.)
Preparing to unpack .../unzip_6.0-16+deb8u2_armhf.deb ...
Unpacking unzip (6.0-16+deb8u2) ...
Setting up unzip (6.0-16+deb8u2) ...
---> 0fff0b36417b
Removing intermediate container dbb2d417bf15
Step 4 : WORKDIR /usr/src
---> Running in a01184a96f9b
---> f9b5a275bc7a
Removing intermediate container a01184a96f9b
Step 5 : RUN wget https://ghost.org/zip/ghost-latest.zip
---> Running in c82319917393
/bin/sh: 1: wget: not found
The command '/bin/sh -c wget https://ghost.org/zip/ghost-latest.zip' returned a non-zero code: 127

Well adding the full stop did not work either. You did notice the full stop didn't you. Should I give up ? Hmm wait on, what are those highlighted lines in the output. Maybe all that is wrong are a few programs. So I altered the Dockerfile and tried again.

Altered from

Code:
RUN apt-get update && apt-get install -y unzip

to this

Code:
RUN apt-get update && apt-get install -y unzip wget apt-utils

This time I got more output and I was feeling pretty confident I had a winner.
I am only posting the start and end of the output to save space.

Code:
pirate@black-pearl in ~/ghost1
$ docker build -t pirate/ghost1 .
Sending build context to Docker daemon 7.168 kB
Step 1 : FROM resin/rpi-raspbian
---> 1b1ef0181c7c
Step 2 : MAINTAINER Saphoooo <[email protected]>
---> Using cache
---> 9c0b8164654a
Step 3 : RUN apt-get update && apt-get install -y unzip apt-utils wget
---> Running in 12968836b9e0
Get:1 http://archive.raspbian.org jessie InRelease [14.9 kB]
Get:2 http://archive.raspberrypi.org jessie InRelease [13.2 kB]

Code:
Preparing to unpack .../archives/wget_1.16-1_armhf.deb ...
Unpacking wget (1.16-1) ...
Selecting previously unselected package unzip.
Preparing to unpack .../unzip_6.0-16+deb8u2_armhf.deb ...
Unpacking unzip (6.0-16+deb8u2) ...
Setting up libapt-inst1.5:armhf (1.0.9.8.3) ...
Setting up libgmp10:armhf (2:6.0.0+dfsg-6+rpi1) ...
Setting up libnettle4:armhf (2.7.1-5+deb8u1) ...
Setting up libhogweed2:armhf (2.7.1-5+deb8u1) ...
Setting up libffi6:armhf (3.1-2) ...
Setting up libp11-kit0:armhf (0.20.7-1) ...
Setting up libtasn1-6:armhf (4.2-3+deb8u2) ...
Setting up libgnutls-deb0-28:armhf (3.3.8-6+deb8u3) ...
Setting up libidn11:armhf (1.29-1+deb8u2) ...
Setting up libicu52:armhf (52.1-8+deb8u3) ...
Setting up apt-utils (1.0.9.8.3) ...
Setting up libpsl0:armhf (0.5.1-1) ...
Setting up wget (1.16-1) ...
Setting up unzip (6.0-16+deb8u2) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
---> f06326e15a18
Removing intermediate container 12968836b9e0
Step 4 : WORKDIR /usr/src
---> Running in 40e687b50ff5
Write failed: Broken pipe

Darn drat and double drat. Wait on though what is this in the original dockefile,

Code:
COPY config.js config.js

Could it be that there is an extra " config.js " file that should not be there. Lets take it out and see if that makes a difference.

Code:
COPY config.js

Well I'll go to bottom of stairs. It sure did make a difference. I used the

Code:
pirate@black-pearl in ~/ghost1

$ docker build -t pirate/ghost1 .

command and got an instant fail. Darn ! Wait on though why am I getting a "docker.service " fail notice when I try to use Docker for any command.
Seems I have been successful yet again :rolleyes: Looks like there is a problem with docker and systemd. Tried all the usual fixes including uninstalliing then reinstalling docker and systemd and finally looked in the journal for clues.

Code:
-- Logs begin at Wed 2016-09-07 22:17:01 UTC, end at Wed 2016-09-07 23:22:15 UTC. --
Sep 07 23:21:53 black-pearl systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Sep 07 23:21:53 black-pearl systemd[1]: Failed to reset devices.list on /system.slice: Invalid argument
Sep 07 23:21:53 black-pearl dockerd[1500]: time="2016-09-07T23:21:53.332321995Z" level=info msg="libcontainerd: new containerd
Sep 07 23:21:54 black-pearl dockerd[1500]: time="2016-09-07T23:21:54.509867602Z" level=fatal msg="Error starting daemon: layer
Sep 07 23:21:54 black-pearl systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 07 23:21:54 black-pearl systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Sep 07 23:21:54 black-pearl systemd[1]: Unit docker.service entered failed state.
Sep 07 23:21:54 black-pearl sudo[1494]: pam_unix(sudo:session): session closed for user root
Sep 07 23:22:15 black-pearl sudo[1529]: pirate : TTY=pts/0 ; PWD=/home/pirate/ghost1 ; USER=root ; COMMAND=/bin/journalctl -xn
Sep 07 23:22:15 black-pearl sudo[1529]: pam_unix(sudo:session): session opened for user root by pirate(uid=0)

As usual the journal entry tells me that docker is not working, I knew that, but it gives me no real helpful information as to why.

Here ends my first real attempt to use Docker.Has it been a success ?

Well of course it has. I have done a real fine job of taking a stable working os and in just a few hours I have managed to bork the entire thing :dance:
So I am making progress as it normally takes me at least two or three days to fully bork a system :lol:

Well that is not fully correct, as Hypriot is still running but I can not use Docker in it so it is no use to me.
I'm going to reinstall Hypriot and have another go.
Will I ever end up with a Ghost in the Shell ?

breakfast.gif
 
Last edited:
Another day another try !

Started of by reinstalling Hypriot on a sd card

Code:
$ flash https://github.com/hypriot/image-builder-rpi/releases/download/v1.0.1/hypriotos-rpi-v1.0.1.img.zip

That went well so popped the sd into the Pi and tried to connect via ssh from my main pc. That threw up

Code:
$ ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
8b:7a:e5:69:00:d2:4b:37:b6:06:6b:b9:e7:b4:7c:b8.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/user/.ssh/known_hosts:1
  remove with: ssh-keygen -f "/home/user/.ssh/known_hosts" -R 192.168.1.4
ECDSA host key for 192.168.1.4 has changed and you have requested strict checking.
Host key verification failed.

Easily rectified by following the instruction to remove the failed key and trying ssh again

Code:
$ ssh [email protected]
The authenticity of host '192.168.1.4 (192.168.1.4)' can't be established.
ECDSA key fingerprint is 8b:7a:e5:69:00:d2:4b:37:b6:06:6b:b9:e7:b4:7c:b8.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.1.4' (ECDSA) to the list of known hosts.
[email protected]'s password:

HypriotOS (Debian GNU/Linux 8)

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Bingo I am in Hypriot. Time to get busy.

Code:
pirate@black-pearl in ~
$ docker pull de13/rpi-ghost
Using default tag: latest
latest: Pulling from de13/rpi-ghost
991507d4dcc6: Pull complete
2ad44321f88a: Pull complete
2f39bd897657: Pull complete
a3ed95caeb02: Pull complete
31a9a074ee45: Pull complete
51e4e74b1e26: Pull complete
3ad9b37a058b: Pull complete
cf4635ff0f02: Pull complete
44e8ce905b87: Pull complete
94984e8a0966: Pull complete
a2fccbbb9450: Pull complete
d472540e37e5: Pull complete
Digest: sha256:75be330bdf114b5615e082c1c17d3a837e57f598062c57f2d87e744c79d46e27
Status: Downloaded newer image for de13/rpi-ghost:latest

Double bingo. Download ok this time. Will Ghost run ?

Code:
pirate@black-pearl in ~
$ docker run -ti -d --name ghost -p 80:2368 de13/rpi-ghost
67b1cf71140f685935c42cbe46111847ee631ca96f40f152e6f32002a628a903

Certainly seems to be up and running. Time to see if I can connect to my Ghost from another pc.

gcDPSNF.png


:dance: way to go :dance:

Now if anyone is reading this thread. Could you try to connect to my Ghost by putting


into your browser address bar and see if you can actually connect. It would be most helpful if you could post whether you were successful or not.

Thanks :cool:

I'll leave the Ghost up and running for this evening but will turn it of when I go to bed. So it will only be possible to access that address today.
 
Could you try to connect to my Ghost by putting

http://192.168.1.4

into your browser address bar and see if you can actually connect.

Ain't gonna work. That address is within (your -- or anybody's, for that matter) router's address range. To be assigned for devices WITHIN your LAN. An INTERNAL addy.
 
Ain't gonna work. That address is within (your -- or anybody's, for that matter) router's address range. To be assigned for devices WITHIN your LAN. An INTERNAL addy.

Darn I knew this was going bottom up at some point.

I do not really understand. I get that I have a local network where local pc's can talk to each other. An you can let any or all of them have internet connection.

I can access the net from my Pi, and ifconfig shows,

Code:
$ ifconfig
docker0   Link encap:Ethernet  HWaddr 02:42:58:b0:b0:da 
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:58ff:feb0:b0da/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:638 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1228 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1791895 (1.7 MiB)  TX bytes:103623 (101.1 KiB)

eth0      Link encap:Ethernet  HWaddr b8:27:eb:a5:f8:48 
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:fea5:f848/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3392 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2451 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:187990 (183.5 KiB)  TX bytes:1936896 (1.8 MiB)

So me internet address is

Code:
inet addr:192.168.1.4

Is it not ? The same address shows up in my router web admin page.


I'm baffled.:cry:
 

Hmm had a look at the router settings and got that the 192 addy is a LAN addy. From Whoami The addy they give matches the router settings.
So do I use that addy **.242.81.** , if so how will the router know which info is for which pc ?

There is a function to set a DMZ up for individual pc's but it does not seem a safe option. Also the router will let me set up a server if I buy a domain name.

Buying the domain name seems the easiest option but it would be nice to be able to make things work in another way. :cool:

Or could I use this function on the router ?

Port Forwarding
This is the ability to open ports in your router and re-direct data through those ports to a single PC on your network.
 
Some progress.

Have given the Pi a static address by making changes to the router. Took me a while as I am not a network guru and did not want to drop myself right in the *****.

Bought a couple of dirt cheap domain names to see if I can make the Pi/GDocker/Ghost stalk the net rather than just my local network. Am still reading up on how to keep safe though.

Spent some time researching and planning around how to make my own Docker image for Ghost. Have had a trial run and I think I have a workable plan.

Also spent some time researching on how to customise and use Ghost. Still a bit hazy on backups and such like. If I get the Docker container side right that will not be such a trial as if changes do not work as expected I can delete the dodgy new container and revert to the last stable one.

Meanwhile I have been pretty busy with all sorts of stuff aswell.

breakfast.gif
 
Ok a bit of light relief for anyone reading this thread.

I need to access the net from the Pi if I want to host a Ghost blog from home. So I bought a domain name.

So what name did I pick ??????????

Prize to be announced at a future date.
breakfast.gif
 
Hmmmmmmmm I'll wait a while before I tell you all what name I chose.

Meanwhile I have been trying to build my own container using the de13/rpi-ghost image I found and mentioned earlier. This image gives me a working container with Ghost so seemed a good place to start.

I altered the Dockerfile and the config.js from the above to suit me and ran the build command.
first try
Code:
$ docker build -t anarchy/myghost:base .

Sending build context to Docker daemon 7.168 kB

Step 1 : FROM hypriot/rpi-node:argon

argon: Pulling from hypriot/rpi-node

728dc9338a8f: Pull complete

a98495ddc334: Pull complete

2d2d05a308f4: Pull complete

9cf465192058: Pull complete

a3ed95caeb02: Pull complete

1945ee3cca3b: Pull complete

9f1a898d26ac: Pull complete

11058e6310cb: Pull complete

4cef7e36ba14: Pull complete

1bc4531b0202: Pull complete

1cc715c76a09: Pull complete

85fe7d1f4a1b: Pull complete

Digest: sha256:efd283165d5ff79da508ec290ebc37a637854250779c606c1d6f576d5ec9dda4

Status: Downloaded newer image for hypriot/rpi-node:argon

---> e5fd52aebf81

Step 2 : MAINTAINER AnArchy

---> Running in 26ffd6cca546

---> 39265595314f

Removing intermediate container 26ffd6cca546

Step 3 : RUN apt-get update && apt-get install -y unzip

---> Running in a8f5fde8266c

Get:1 http://archive.raspberrypi.org jessie InRelease

Get:2 http://resin-packages.s3-website-us-east-1.amazonaws.com resin InRelease

Get:3 http://archive.raspbian.org jessie InRelease

Splitting up /var/lib/apt/lists/partial/archive.raspberrypi.org_debian_dists_jessie_InRelease into data and signature failedIgn http://archive.raspberrypi.org jessie InRelease

E: GPG error: http://archive.raspberrypi.org jessie InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)

The command '/bin/sh -c apt-get update && apt-get install -y unzip' returned a non-zero code: 100

Drat seems not to work. Lets try again
second try
Code:
$ docker build -t anarchy/myghost:base .
Sending build context to Docker daemon 7.168 kB
Step 1 : FROM hypriot/rpi-node:argon
---> e5fd52aebf81
Step 2 : MAINTAINER AnArchy
---> Using cache
---> 39265595314f
Step 3 : RUN apt-get update && apt-get install -y unzip
---> Running in e0c711c260c5
Get:1 http://archive.raspbian.org jessie InRelease [14.9 kB]
Get:2 http://archive.raspberrypi.org jessie InRelease [13.2 kB]
Ign http://resin-packages.s3-website-us-east-1.amazonaws.com resin InRelease
Get:3 http://resin-packages.s3-website-us-east-1.amazonaws.com resin Release.gpg [801 B]
Get:4 http://archive.raspbian.org jessie/main armhf Packages [12.5 MB]
Get:5 http://resin-packages.s3-website-us-east-1.amazonaws.com resin Release [2258 B]
Get:6 http://archive.raspberrypi.org jessie/main armhf Packages [146 kB]
Get:7 http://resin-packages.s3-website-us-east-1.amazonaws.com resin/main armhf Packages [2633 B]
Get:8 http://archive.raspbian.org jessie/contrib armhf Packages [42.6 kB]
Get:9 http://archive.raspbian.org jessie/non-free armhf Packages [83.5 kB]
Get:10 http://archive.raspbian.org jessie/rpi armhf Packages [1297 B]
Get:11 http://archive.raspbian.org jessie/firmware armhf Packages [1203 B]
Fetched 12.8 MB in 1min 36s (133 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  zip
The following NEW packages will be installed:
  unzip
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 142 kB of archives.
After this operation, 394 kB of additional disk space will be used.
Get:1 http://archive.raspbian.org/raspbian/ jessie/main unzip armhf 6.0-16+deb8u2 [142 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 142 kB in 0s (143 kB/s)
Selecting previously unselected package unzip.
(Reading database ... 21208 files and directories currently installed.)
Preparing to unpack .../unzip_6.0-16+deb8u2_armhf.deb ...
Unpacking unzip (6.0-16+deb8u2) ...
Processing triggers for mime-support (3.58) ...
Setting up unzip (6.0-16+deb8u2) ...
---> e2af6f66b359
Removing intermediate container e0c711c260c5
Step 4 : WORKDIR /usr/src
---> Running in 02626acb9dee
---> 60f54217c7b1
Removing intermediate container 02626acb9dee
Step 5 : RUN wget https://ghost.org/zip/ghost-0.8.0.zip
---> Running in ece001c15208
--2016-09-17 15:25:06--  https://ghost.org/zip/ghost-0.8.0.zip
Resolving ghost.org (ghost.org)... 104.16.85.186, 104.16.82.186, 104.16.81.186, ...
Connecting to ghost.org (ghost.org)|104.16.85.186|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://d36u7lo2kegj1p.cloudfront.net/archives/ghost-0.8.0.zip [following]
--2016-09-17 15:25:07--  http://d36u7lo2kegj1p.cloudfront.net/archives/ghost-0.8.0.zip
Resolving d36u7lo2kegj1p.cloudfront.net (d36u7lo2kegj1p.cloudfront.net)... 54.192.197.173, 54.192.197.227, 54.192.197.100, ...
Connecting to d36u7lo2kegj1p.cloudfront.net (d36u7lo2kegj1p.cloudfront.net)|54.192.197.173|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://ghost.org/archives/ghost-0.8.0.zip [following]
--2016-09-17 15:25:07--  https://ghost.org/archives/ghost-0.8.0.zip
Connecting to ghost.org (ghost.org)|104.16.85.186|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4062292 (3.9M) [application/zip]
Saving to: ‘ghost-0.8.0.zip’

0K .......... .......... .......... .......... ..........  1%  151K 26s
50K .......... .......... .......... .......... ..........  2%  161K 25s
   100K .......... .......... .......... .......... ..........  3%  166K 24s
   150K .......... .......... .......... .......... ..........  5%  115K 26s
   200K .......... .......... .......... .......... ..........  6%  266K 23s
   250K .......... .......... .......... .......... ..........  7%  145K 23s
   300K .......... .......... .......... .......... ..........  8%  166K 23s
   350K .......... .......... .......... .......... .......... 10%  157K 23s
   400K .......... .......... .......... .......... .......... 11%  165K 22s
   450K .......... .......... .......... .......... .......... 12% 91.8K 23s
   500K .......... .......... .......... .......... .......... 13%  269K 22s
   550K .......... .......... .......... .......... .......... 15%  301K 21s
   600K .......... .......... .......... .......... .......... 16% 7.85K 52s
   650K .......... .......... .......... .......... .......... 17% 1.90M 47s
   700K .......... .......... .......... .......... .......... 18% 1.82M 44s
   750K .......... .......... .......... .......... .......... 20% 1.99M 40s
   800K .......... .......... .......... .......... .......... 21% 2.03M 37s
   850K .......... .......... .......... .......... .......... 22% 1.98M 35s
   900K .......... .......... .......... .......... .......... 23% 2.31M 33s
   950K .......... .......... .......... .......... .......... 25% 1.96M 30s
1000K .......... .......... .......... .......... .......... 26% 2.45M 29s
  1050K .......... .......... .......... .......... .......... 27% 3.42M 27s
  1100K .......... .......... .......... .......... .......... 28% 3.79M 25s
  1150K .......... .......... .......... .......... .......... 30%  996K 24s
  1200K .......... .......... .......... .......... .......... 31%  166K 23s
  1250K .......... .......... .......... .......... .......... 32%  141K 23s
  1300K .......... .......... .......... .......... .......... 34%  171K 22s
  1350K .......... .......... .......... .......... .......... 35%  171K 21s
  1400K .......... .......... .......... .......... .......... 36%  166K 21s
  1450K .......... .......... .......... .......... .......... 37%  161K 20s
  1500K .......... .......... .......... .......... .......... 39%  153K 20s
  1550K .......... .......... .......... .......... .......... 40%  166K 19s
  1600K .......... .......... .......... .......... .......... 41%  103K 19s
  1650K .......... .......... .......... .......... .......... 42%  369K 18s
  1700K .......... .......... .......... .......... .......... 44%  166K 17s
  1750K .......... .......... .......... .......... .......... 45%  161K 17s
  1800K .......... .......... .......... .......... .......... 46%  149K 16s
  1850K .......... .......... .......... .......... .......... 47%  171K 16s
  1900K .......... .......... .......... .......... .......... 49%  166K 16s
  1950K .......... .......... .......... .......... .......... 50%  113K 15s
  2000K .......... .......... .......... .......... .......... 51%  313K 15s
  2050K .......... .......... .......... .......... .......... 52%  139K 14s
  2100K .......... .......... .......... .......... .......... 54%  193K 14s
  2150K .......... .......... .......... .......... .......... 55%  138K 13s
  2200K .......... .......... .......... .......... .......... 56%  186K 13s
  2250K .......... .......... .......... .......... .......... 57%  135K 12s
  2300K .......... .......... .......... .......... .......... 59%  188K 12s
  2350K .......... .......... .......... .......... .......... 60%  161K 12s
  2400K .......... .......... .......... .......... .......... 61%  157K 11s
  2450K .......... .......... .......... .......... .......... 63%  171K 11s
  2500K .......... .......... .......... .......... .......... 64%  166K 10s
  2550K .......... .......... .......... .......... .......... 65%  157K 10s
  2600K .......... .......... .......... .......... .......... 66%  165K 10s
  2650K .......... .......... .......... .......... .......... 68%  157K 9s
  2700K .......... .......... .......... .......... .......... 69%  153K 9s
  2750K .......... .......... .......... .......... .......... 70%  170K 8s
  2800K .......... .......... .......... .......... .......... 71%  125K 8s
  2850K .......... .......... .......... .......... .......... 73%  227K 8s
  2900K .......... .......... .......... .......... .......... 74%  170K 7s
  2950K .......... .......... .......... .......... .......... 75%  153K 7s
  3000K .......... .......... .......... .......... .......... 76%  170K 7s
  3050K .......... .......... .......... .......... .......... 78%  153K 6s
  3100K .......... .......... .......... .......... .......... 79% 99.4K 6s
  3150K .......... .......... .......... .......... .......... 80%  351K 5s
  3200K .......... .......... .......... .......... .......... 81%  170K 5s
  3250K .......... .......... .......... .......... .......... 83%  166K 5s
  3300K .......... .......... .......... .......... .......... 84%  170K 4s
  3350K .......... .......... .......... .......... .......... 85%  145K 4s
  3400K .......... .......... .......... .......... .......... 86%  166K 4s
  3450K .......... .......... .......... .......... .......... 88%  140K 3s
  3500K .......... .......... .......... .......... .......... 89%  202K 3s
  3550K .......... .......... .......... .......... .......... 90%  145K 3s
  3600K .......... .......... .......... .......... .......... 92%  161K 2s
  3650K .......... .......... .......... .......... .......... 93%  175K 2s
  3700K .......... .......... .......... .......... .......... 94%  171K 2s
  3750K .......... .......... .......... .......... .......... 95% 89.0K 1s
  3800K .......... .......... .......... .......... .......... 97%  860K 1s
  3850K .......... .......... .......... .......... .......... 98%  145K 0s
  3900K .......... .......... .......... .......... .......... 99%  171K 0s
  3950K .......... .......                                    100%  230K=27s

2016-09-17 15:25:35 (144 KB/s) - ‘ghost-0.8.0.zip’ saved [4062292/4062292]

Write failed: Broken pipe

Looks like the first try had a bad network connection or some such. This second try looked good but fell at the last fence.

It also seems to have interfered with docker on the pi host as I get

Code:
$ sudo systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled)
  Drop-In: /etc/systemd/system/docker.service.d
           └─overlay.conf
   Active: failed (Result: exit-code) since Sat 2016-09-17 15:50:04 UTC; 18s ago
     Docs: https://docs.docker.com
  Process: 1009 ExecStart=/usr/bin/dockerd --storage-driver overlay -H fd:// (code=exited, status=1/FAILURE)
Main PID: 1009 (code=exited, status=1/FAILURE)

Sep 17 15:50:03 black-pearl dockerd[1009]: time="2016-09-17T15:50:03.5387626..."
Sep 17 15:50:04 black-pearl dockerd[1009]: time="2016-09-17T15:50:04.6787376..."
Sep 17 15:50:04 black-pearl systemd[1]: docker.service: main process exited,...E
Sep 17 15:50:04 black-pearl systemd[1]: Failed to start Docker Application C....
Sep 17 15:50:04 black-pearl systemd[1]: Unit docker.service entered failed s....
Hint: Some lines were ellipsized, use -l to show in full.

Code:
$ docker build -t anarchy/myghost:base .
Sending build context to Docker daemon 7.168 kB
An error occurred trying to connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&rm=1&shmsize=0&t=anarchy%2Fmyghost%3Abase&ulimits=null: read unix @->/var/run/docker.sock: read: connection reset by peer

I tried to update and upgrade the HypriotOS on the Pi along with a host of systemd commands but it looks like docker is completely busted as this also fails

Code:
$ docker pull de13/rpi-ghost
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (An error occurred trying to connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info: read unix @->/var/run/docker.sock: read: connection reset by peer). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Can anyone spot what is wrong with my attempt ?
Or can anyone help with getting docker running again ?

I can do a clean install of the HypriotOS pretty quickly but would like to find out what I am doing wrong.
 
Here are the changes I made to the Dockerfile
Code:
FROM hypriot/rpi-node:argon
MAINTAINER AnArchy
RUN apt-get update && apt-get install -y unzip
WORKDIR /usr/src
RUN wget https://ghost.org/zip/ghost-0.8.0.zip
RUN unzip -d ghost ghost-0.8.0.zip
WORKDIR /usr/src/ghost
RUN npm install --production
COPY config.js config.js
EXPOSE 2368
VOLUME /var/lib/ghost
CMD npm start --production
This is the original
Code:
FROM hypriot/rpi-node:argon
MAINTAINER Saphoooo <[email protected]>
RUN apt-get update && apt-get install -y unzip
WORKDIR /usr/src
RUN wget https://ghost.org/zip/ghost-latest.zip
RUN unzip -d ghost ghost-latest.zip
WORKDIR /usr/src/ghost
RUN npm install --production
COPY config.js config.js
EXPOSE 2368
VOLUME /var/lib/ghost
CMD npm start --production
Here is the small change I made to the config.js
Code:
config = {
    // ### Production
    // When running Ghost in the wild, use the production environment.
    // Configure your URL and mail settings here
    production: {
        url: 'http://an-archy.rocks',
here is the original
Code:
config = {
    // ### Production
    // When running Ghost in the wild, use the production environment.
    // Configure your URL and mail settings here
    production: {
url: 'http://my-ghost-blog.com',

Do not know if that info helps but it might. :cool:
 
Hmm seems there are no Docker experimenters around. Never mind as I have this project on hold for a short while.

@Becky an @Urmas the domain name I chose was an-archy.rocks. :lol::dance::lol:
 
Back
Top