From 6452a0de742292ad822569d993748cc7fa38c471 Mon Sep 17 00:00:00 2001 From: Matthew Macdonald-Wallace Date: Wed, 17 Mar 2021 17:07:04 +0000 Subject: [PATCH 1/3] Add Dockerfile to run service in a container Fixes #75 NOTE: At the moment, the focalboard version is hard-coded and there is a bug that means the download is not actually a .tar.gz file, but a .tgz.gz file inside a .zip file. --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..9fe94425b83 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:latest + +RUN apt update +RUN apt upgrade -y +RUN apt install -y wget tar gzip unzip file +RUN wget https://releases.mattermost.com/focalboard/0.5.0/focalboard-server-linux-amd64.tar.gz +RUn unzip -o focalboard-server-linux-amd64.tar.gz +RUN tar -xvzf focalboard-server-linux-amd64.tar.gz +RUN mv focalboard /opt + +EXPOSE 8000 + +WORKDIR /opt/focalboard + +CMD /opt/focalboard/bin/focalboard-server From 0b58cf8f1feb165391de0447cb725882ad4aab50 Mon Sep 17 00:00:00 2001 From: Matthew Macdonald-Wallace Date: Thu, 18 Mar 2021 06:57:33 +0000 Subject: [PATCH 2/3] Split RUN commands into two layers --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9fe94425b83..8aff60a97e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,15 @@ FROM ubuntu:latest -RUN apt update -RUN apt upgrade -y -RUN apt install -y wget tar gzip unzip file -RUN wget https://releases.mattermost.com/focalboard/0.5.0/focalboard-server-linux-amd64.tar.gz -RUn unzip -o focalboard-server-linux-amd64.tar.gz -RUN tar -xvzf focalboard-server-linux-amd64.tar.gz -RUN mv focalboard /opt +# Make sure that the underlying container is patched to the latest versions +RUN apt update && \ + apt upgrade -y && \ + apt install -y wget tar gzip unzip file + +# Now install Focalboard as a seperate layer +RUN wget https://releases.mattermost.com/focalboard/0.5.0/focalboard-server-linux-amd64.tar.gz && \ + unzip -o focalboard-server-linux-amd64.tar.gz && \ + tar -xvzf focalboard-server-linux-amd64.tar.gz && \ + mv focalboard /opt EXPOSE 8000 From 463b38d073e94d8520922578ab5198232c9621cc Mon Sep 17 00:00:00 2001 From: Matthew Macdonald-Wallace Date: Thu, 18 Mar 2021 10:04:03 +0000 Subject: [PATCH 3/3] Remove apt upgrade following comments on various platforms --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8aff60a97e7..9ccb5988be5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ FROM ubuntu:latest # Make sure that the underlying container is patched to the latest versions RUN apt update && \ - apt upgrade -y && \ apt install -y wget tar gzip unzip file # Now install Focalboard as a seperate layer