An unsafe solution to the problem is to run Google Chrome with a special argument:
chrome --allow-outdated-plugins
An unsafe solution to the problem is to run Google Chrome with a special argument:
chrome --allow-outdated-plugins
regedit.exe /e putty-sessions.regedit5.reg 'HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions'
regedit.exe /a putty-sessions.regedit4.reg 'HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions'
/etc
.
Debian provides an elegant way to restore files of the maintainer’s version without touching your existing configuration.
Let’s say I’ve removed the file /etc/apache2/sites-available/000-default.conf
, here’s the procedure to recover it:
# dpkg -S /etc/apache2/sites-available/000-default.conf
# apt-get install --reinstall -o Dpkg::Options::="--force-confmiss" apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not upgraded.
Need to get 86,7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ saucy-updates/main apache2 amd64 2.4.6-2ubuntu2.1 [86,7 kB]
Fetched 86,7 kB in 0s (264 kB/s)
(Reading database ... 245864 files and directories currently installed.)
Preparing to replace apache2 2.4.6-2ubuntu2.1 (using .../apache2_2.4.6-2ubuntu2.1_amd64.deb) ...
Unpacking replacement apache2 ...
Processing triggers for man-db ...
Processing triggers for ufw ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up apache2 (2.4.6-2ubuntu2.1) ...
Configuration file `/etc/apache2/sites-available/000-default.conf', does not exist on system.
Installing new config file as you requested.
* Restarting web server apache2
...done.
That’s all.
There’s another interesting case when this procedure comes handy: if you changed a default etc file and you want to restore it. In that case you can simply delete it and use the same apt-get
command:
# apt-get install --reinstall -o Dpkg::Options::="--force-confmiss" <package name>
A problem I found recently dealed with the ADD
directive used in the Dockerfile
. I was trying to start some services with supervisor
but I got this error during the image build process
Step 19 : ADD supervisord.conf /etc/supervisor/conf.d/
2014/02/10 00:40:55 build: supervisord.conf: no such file or directory
The file was right there, in the same path of the Dockerfile
, but docker couldn’t find it.
After a good read of the official documentation I learned the conxept of “build context”. When you are building an image, the source directory from which you are operating is the build context, but when you are building passing the Dockerfile
from the standard input, there’s no build context!
So this is ok
$ docker build -t mydebian .
and this can’t work
$ docker build -t mydebian - < Dockerfile
Dockerfile
to install the needed packages.
This continuous refinement forces the build process to download the same deb packages every time and it becomes an actual waste of time and bandwidth.
apt-cacher-ng
is a service which can be run on a Debian or Ubuntu host and will serve as a local cache for deb packages from Debian or Ubuntu repositories.
That’s what I need because I’m on an Ubuntu machine emulating a Debian container.
The setup is really easy:
# aptitude install apt-cacher-ng
After the installation I changed the bind address of the service to keep it local (I don’t need LAN exposure), I added my local proxy to reach the internet and I disabled ReuseConnections
(see Problems):
root@yoda:/etc/apt-cacher-ng# diff acng.conf acng.conf.old
28d27
< BindAddress: localhost 172.17.42.1
35d33
< proxy: http://127.0.0.1:5865
322d319
< ReuseConnections: 0
On the client side it’s necessary to force apt requests to use the proxy.
In the Dockerfile
I added
RUN echo 'Acquire::http::Proxy "http://172.17.42.1:3142";' > /etc/apt/apt.conf.d/90-apt-cacher.conf
which creates the configuration file read by apt-get
or aptitude
when downloading packages.
The apt-cacher-ng
server seems buggy at least when used in conjunction with a regular proxy. Sometimes I get errors like these on the client side
Err http://http.debian.net/debian/ wheezy/main netbase all 5.0
500 Invalid header
one possible solution is to perform a
# apt-get update
on the host machine (it seems to help). Another useful setting is
ReuseConnections: 0
as explained before.
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.