2019-09-16 19:55:53 +02:00
|
|
|
# Packaging
|
|
|
|
|
|
|
|
This directory contains docker images used for creating packages for different distribution.
|
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
## How to use this docker files
|
2019-09-16 19:55:53 +02:00
|
|
|
|
|
|
|
Start with:
|
|
|
|
|
2019-09-19 17:57:36 +02:00
|
|
|
```bash
|
2020-06-23 20:21:47 +02:00
|
|
|
docker build -f docker/packaging/Dockerfile.ubuntu-bionic -t nushell/package:ubuntu-bionic .
|
2019-09-19 17:57:36 +02:00
|
|
|
```
|
2019-09-16 19:55:53 +02:00
|
|
|
|
2019-09-19 17:57:36 +02:00
|
|
|
after building the image please run container:
|
|
|
|
|
|
|
|
```bash
|
2020-06-23 20:21:47 +02:00
|
|
|
docker run -td --rm --name nushell_package_ubuntu_bionic nushell/package:ubuntu-bionic
|
2020-03-13 18:23:41 +01:00
|
|
|
```
|
2019-09-16 19:55:53 +02:00
|
|
|
|
2019-09-18 17:43:06 +02:00
|
|
|
and copy deb package from inside:
|
|
|
|
|
2019-09-19 17:57:36 +02:00
|
|
|
```bash
|
2020-06-23 20:21:47 +02:00
|
|
|
docker cp nushell_package_ubuntu_bionic:/nu_0.2.0-1_amd64.deb .
|
2019-09-19 17:57:36 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
or shell inside, and test install:
|
|
|
|
|
|
|
|
```bash
|
2020-06-23 20:21:47 +02:00
|
|
|
docker exec -it nushell_package_ubuntu_bionic bash
|
|
|
|
dpkg -i /nu_0.2.0-1_amd64.deb
|
2019-09-19 17:57:36 +02:00
|
|
|
|
|
|
|
(Reading database ... 25656 files and directories currently installed.)
|
|
|
|
Preparing to unpack /nu_0.2.0-1_amd64.deb ...
|
|
|
|
Unpacking nu (0.2.0-1) over (0.2.0-1) ...
|
|
|
|
Setting up nu (0.2.0-1) ...
|
|
|
|
```
|
|
|
|
|
|
|
|
When you are finished, exit and stop the container. It will be removed since we
|
|
|
|
used `--rm`.
|
|
|
|
|
|
|
|
```bash
|
2020-06-23 20:21:47 +02:00
|
|
|
docker stop nushell_package_ubuntu_bionic
|
2019-09-19 17:57:36 +02:00
|
|
|
```
|
2019-09-16 19:55:53 +02:00
|
|
|
|
|
|
|
## 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.
|
2020-06-23 20:21:47 +02:00
|
|
|
<https://github.com/nushell/nushell/issues/681>
|
2019-09-18 17:43:06 +02:00
|
|
|
|
2019-09-16 19:55:53 +02:00
|
|
|
* File debian/changelog file should be generated based on git history.
|
2020-06-23 20:21:47 +02:00
|
|
|
<https://github.com/nushell/nushell/issues/682>
|
2019-09-18 17:43:06 +02:00
|
|
|
|
|
|
|
* Building package and nu version should be parametrized.
|
2020-06-23 20:21:47 +02:00
|
|
|
<https://github.com/nushell/nushell/issues/683>
|