From 4ad249694fb3cb5d7744b4244227411f31494eea Mon Sep 17 00:00:00 2001 From: Jan Koprowski Date: Mon, 16 Sep 2019 19:55:53 +0200 Subject: [PATCH] Base on quay.io/nushell/nu-base:latest image --- docker/packaging/Dockerfile.ubuntu-bionic | 17 +++++++++++++++++ docker/packaging/README.md | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docker/packaging/Dockerfile.ubuntu-bionic create mode 100644 docker/packaging/README.md diff --git a/docker/packaging/Dockerfile.ubuntu-bionic b/docker/packaging/Dockerfile.ubuntu-bionic new file mode 100644 index 000000000..144f7b421 --- /dev/null +++ b/docker/packaging/Dockerfile.ubuntu-bionic @@ -0,0 +1,17 @@ +# docker build -f docker/packaging/Dockerfile.ubuntu-bionic . + +ARG FROMTAG=latest +FROM quay.io/nushell/nu-base:${FROMTAG} + +RUN apt-get update && apt-get install -y \ + devscripts \ + debhelper + +COPY debian /code/debian + +RUN rustc -Vv && cargo build --release && \ + cp README.md debian/README.Debian && \ + debuild -b -us -uc -i && \ + dpkg -i ../nu_0.2.0-1_amd64.deb && \ + chsh -s /usr/bin/nu && \ + echo 'ls | get name | echo $it' | /usr/bin/nu \ No newline at end of file diff --git a/docker/packaging/README.md b/docker/packaging/README.md new file mode 100644 index 000000000..8ca442bda --- /dev/null +++ b/docker/packaging/README.md @@ -0,0 +1,21 @@ +# Packaging + +This directory contains docker images used for creating packages for different distribution. + +## How to use this docker files? + +Start with: + +`docker build -f docker/packaging/Dockerfile.ubuntu-bionic .` + +after building the image please copy dpkg package from inside: + +`docker cp $(docker ps -q -a | head -n1):/nu_0.2.0-1_amd64.deb .` + +## What should be done + +* We should run sbuild command to create chroot and then install dpkg. +For two reasons. First: we want to use the same tools as Ubuntu package builders +to handle the cornercases. Second: we want to test dpkg requirements. +* File debian/changelog file should be generated based on git history. +* Building package and nu version should be parametrized. \ No newline at end of file