If you use docker behind a proxy you need to specify the corresponding environment variables to download images from internet. In my case I use docker on a mac os hence I use boot2docker Linux based virtual machine to host the docker process. Here are few simple steps to configure the proxy for boot2docker (version 1.1.1):
1. Login to the host vm
bash-3.2$ boot2docker ssh
2. find where the docker configuration is stored
docker@boot2docker:~$ ls -la /etc/init.d/docker
lrwxrwxrwx 1 root root 28 Jul 17 07:46 /etc/init.d/docker -> /usr/local/etc/init.d/docker
3. If you cat the startup script you’ll see something like
#import settings from profile (e.g. HTTP_PROXY, HTTPS_PROXY)
test -f "/var/lib/boot2docker/profile" && . "/var/lib/boot2docker/profile"
4. Check to see if profile file exists and add the needed configuration
5. Restart the docker process
sudo /etc/init.d/docker restart
That’s it now you can pull docker images if you’re behind a proxy.
this small blog is inspired from jersey 2.2 user guide, particularly section 1 :).
The guide is just fine, featuring quite a number of examples enriched with explanations and references. While I was browsing through it I was thinking what if I change a bit the running environment with components I prefer for both developing and testing.
The examples in the guide require grizzly, which I changed with tomcat.
The tests are plain junit which I changed with arquillian in-container test adding arquillian tomcat container.
If you’re interested how this look like check the maven based project located here:
Here you can find a file upload example dealing with JSR 356 encoders and decoders.
Just published the second blog. This time it is dedicated to websocket message handling in Java.
Take a look. Comments and feedback are welcome
Just started to write down my findings while I was working with JSR 356 and Apache Tomcat 8 implementation. I’m organizing these in a couple of pages. Checkout Developer’s perspective on Java™ API for WebSocket – JSR 356 part I