How to manage system dependencies when using azk?

I am using azk and my system is dependent on additional packages. I will be able to install them using (since I am using an image based on Ubuntu):

apt-get -yq update && apt-get install -y libqtwebkit-dev qt4-qmake

Can I add these steps to provide? As Azkfile.jsit will look like this:

// ...
provision: [
  "apt-get -yq update",
  "apt-get install -y libqtwebkit-dev qt4-qmake",
  "bundle install --path /azk/bundler",
  "bundle exec rake db:create",
  "bundle exec rake db:migrate",
]

Or is it better to create a new Docker image?

+4
source share
2 answers

, , , , . , , bundle .

Dockerfile. :

FROM azukiapp/ruby:2.2.2 # or the image you were using previously
RUN apt-get -yq update && \
    apt-get install -y libqtwebkit-dev qt4-qmake && \
    apt-get clean -qq && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Keeping the image as small as possible

Azkfile.js image Dockerfile ( azk docs ):

image: { dockerfile: './PATH_TO_DOCKERFILE' },

, azk start, azk Docker .

. azk Docker, -B azk start.

+4

, Linux Debian, (https://wiki.debian.org/Packaging) Debian (https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-virtual), , . , dpkg -i ( apt-get install, -), , , , apt.

postinst prerm Debian (https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-maintscripts). , bundle gem, .

: 1. -, pull , host apt-get update && & apt-get - diego
2. . dpkg -l, , , .
3. prerm , , , "" .

, debian/apt . Slack RHEL, . , , , , Bash.

0

Source: https://habr.com/ru/post/1610597/


All Articles