Empacotamento Debian com Docker

Presenter Notes

Daniel Pimentel

  • Mestre em Informática
  • Especialista em Engenharia de Software
  • Graduado em Análise e Desenvolvimento de Sistemas
  • Técnico em Informática
  • Desenvolvedor
  • Guitarrista
  • Motociclista
  • Geek

Presenter Notes

Debian

Presenter Notes

Docker

Presenter Notes

Init

1 git clone git@gitlab.com:d4n1/package.git

Presenter Notes

nvim dockerfile

 1 FROM debian:sid
 2 
 3 RUN apt update
 4 RUN apt install -y autopkgtest blhc devscripts dh-make dput-ng \
 5     how-can-i-help locales quilt renameutils spell splitpatch \
 6     git gnupg tree wget neovim
 7 
 8 ADD conf/bashrc /etc/bash.bashrc
 9 ADD conf/locale.gen /etc/locale.gen
10 ADD conf/lintianrc /etc/lintianrc
11 ADD conf/devscripts.conf /etc/devscripts.conf
12 ADD conf/init.vim /root/.config/nvim/init.vim
13 ADD conf/.gnupg /root/.gnupg
14 ADD packages /packages
15 
16 WORKDIR /packages
17 
18 VOLUME packages /packages

Presenter Notes

nvim conf/bashrc

1 export DEBFULLNAME="Daniel Pimentel"
2 export DEBEMAIL="d4n1@d4n1.org"
3 export EDITOR="nvim"
4 export LANG=C.UTF-8
5 export LANGUAGE=C.UTF-8
6 export LC_ALL=C.UTF-8
7 export QUILT_PATCHES=debian/patche

Presenter Notes

nvim conf/locale.gen

1 en_US.UTF-8 UTF-8

Presenter Notes

nvim conf/lintianrc

1 display-info = yes
2 pedantic = yes
3 display-experimental = yes
4 color = auto

Presenter Notes

nvim conf/devscripts.conf

1 DEBSIGN_KEYID=D9F9EADD6F26AC782CFCD8317FECE9042C7BFD45

Presenter Notes

nvim conf/init.vim

 1 syntax on
 2 set encoding=utf8
 3 set textwidth=79
 4 set tabstop=4
 5 set softtabstop=4
 6 set shiftwidth=4
 7 set autoindent
 8 set expandtab
 9 set smarttab
10 set laststatus=2
11 set ignorecase
12 set list
13 set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
14 hi MatchParen cterm=none ctermbg=gray ctermfg=black

Presenter Notes

Build

1 docker build -t debian-package .

Presenter Notes

Run

1 docker run -it -v `pwd`/packages:packages debian-package

Presenter Notes

Destroy

1 docker images -a | grep "debian-package" | awk '{print $3}' | \
2     xargs docker rmi

Presenter Notes

nvim makefile

1 build:
2     docker build -t debian-package .
3 run:
4     docker run -it -v `pwd`/packages:/packages debian-package
5 destroy:
6     docker images -a | grep "debian-package" | awk '{print $3}' | \
7         xargs docker rmi --force

Presenter Notes

d4n1.org