In this tutorial, we will install Kolab groupware on a CentOS 7 server. Kolab is a free open source groupware server. It is a scalable and reliable collaborative software that provides shared email, calendar, address books, tasks and a file cloud. Kolab supports several client environments: on Windows you can use Outlook, on Linux, you can use KDE Kontact, on all OS that have a web browser you can use the web interface.
How to Build Your Own Custom Docker Images
In Getting Started With Docker, I described the basics of downloading and running a Docker image. In this article, I’ll show how to build a LAMP server as an exercise for learning the basics of creating your own custom Docker spins.
There are two key elements in making your own Docker images: the Dockerfile, and using an official image from the public repository on the Docker hub as your base. Yes, you can roll your own from your favorite Linux distribution, and it would be a marvelous learning experience. And a long one, because running Linux inside a container is very different from running it in the usual way, installed directly on your hardware, or in a virtual machine. It is not a small task to make a Docker-friendly base image from scratch. So, I recommend taking advantage of the nice free images built by people who know what they’re doing.![]()
The Dockerfile
I’ll pick up where left I off in Getting Started With Docker and recycle the example Dockerfile. Re-using images is fast and efficient, as you don’t have to keep downloading them.
It’s best to put your Dockerfiles in their own directories, to keep your little herd of Docker images all properly separated and to avoid errors like accidentally building the entire contents of your hard drive into your Docker image. The following example Dockerfile is in my dockerstuff/apache directory.
# Barebones Apache installation on Ubuntu
FROM ubuntu
MAINTAINER DockerFan version 1.0
ENV DEBIAN_FRONTEND noninteractive
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
RUN apt-get update && apt-get install -y apache2
EXPOSE 8080
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
This is a simple setup that installs and starts a barebones Apache server into the official Ubuntu image. Let’s take a look at what the entries in the file mean. Docker processes each line in order. The format of a Dockerfile is:
# Comment
INSTRUCTION arguments
Comments are just like any comments in a configuration file; any line prefaced with a hash mark is ignored by Docker, and you can put them anywhere in your Dockerfile on their own lines, and at the ends of instruction lines:
# Comment
INSTRUCTION arguments
# Comment
INSTRUCTION arguments #Comment
INSTRUCTIONS are not case-sensitive, but they are capitalized to make them stand out from your arguments. Arguments are whatever commands and settings are needed to set up your image the way you want, such as environment variables, installing packages, setting up configuration files, usernames and passwords, starting services. In other words, any command you can run on a Linux system.
Here’s what the instructions do:
-
FROM is always your first instruction, because it names the base image you’re building your new image from.
-
MAINTAINER is the creator of the Dockerfile.
-
ENV sets environment variables, in the form ENV [key] [value]. This assigns a single value to the key, as in our example Dockerfile. The value can be any string, including spaces and punctuation, so you can configure values like IP addresses, URLs, and passphrases. Note that when you set DEBIAN_FRONTEND noninteractive (for an unattended installation) in your Dockerfile there is no equals sign, as there is when you script a standard Debian or Ubuntu installation with export DEBIAN_FRONTEND=noninteractive.
-
There are multiple instructions for setting environment variables: ADD, COPY, ENV, EXPOSE, LABEL, USER, WORKDIR, VOLUME, STOPSIGNAL, and ONBUILD.
-
RUN executes commands. The example above, RUN apt-get update && apt-get install -y apache2, demonstrates two important steps. It is a good practice to use apt-get update && apt-get install foo together to ensure that an updated packaged will be installed. Docker makes generous use of caching, so this prevents a cached packaged from being installed. If you’re sure your cached packages are fresh enough then it’s not necessary, and will save you some download time. apt-get install -y must be used together with ENV DEBIAN_FRONTEND noninteractive; it means answer Yes to all prompts and run non-interactively.
-
EXPOSE defines which ports you want open at runtime, in a space-delimited list.
-
CMD can be used only once in your Dockerfile. If you have more than one, only the last one will run. The preferred syntax is CMD [“executable”,”param1″,”param2″]. The parameters are optional and comma-separated if you have more than one.
Adding MP and SSL
We have the LA parts of our LAMP stack, so let’s add the M and P: MariaDB and PHP, and OpenSSL. The whole Dockerfile looks like this:
# Ubuntu LAMP stack with Apache, MariaDB, PHP, and SSL
FROM ubuntu
MAINTAINER DockerFan version 1.0
ENV DEBIAN_FRONTEND noninteractive
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# Install Apache, SSL, PHP, and some PHP modules
RUN apt-get update && apt-get install -y apache2
openssl
php5
php5-cli
php5-apcu
# Install MariaDB and set default root password
RUN echo 'mariadb-server mariadb-server/root_password password mypassword' | debconf-set-selections
RUN echo 'mariadb-server mariadb-server/root_password_again password mypassword' | debconf-set-selections
RUN apt-get install mariadb-server -y
# Disable the default Apache site config
# Install your site's Apache configuration and activate SSL
ADD my_apache.conf /etc/apache2/sites-available/
RUN a2dissite 000-default
RUN a2ensite my_apache
RUN a2enmod ssl
# Remove APT files
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 443 8080
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
The section that installs Apache, SSL, and PHP shows the proper Docker way to install multiple packages at once, with each package on its own line ending in a backslash. The MariaDB installation sections shows how to use debconf to automatically set the root DB password.
You will need your own Apache virtual host configuration file, and it should be in the same directory as your Dockerfile. Use the ADD instruction to build it into your image. I like to do a little housecleaning to keep my image as small as possible by running apt-get clean, and removing temp files.
Since we are using SSL, we’ll need port 443 available. On a production system, you would probably want only port 443 enabled, and use mod_rewrite to automatically redirect HTTP requests to HTTPS.
What Next?
I encourage you to practice a lot on test systems, and do not deploy your images to production systems until you have had a lot of practice and testing. The neat thing about Docker is its speed: You can build, tear down, change, and build new images very quickly. The nice Docker people teach that building super-simple specialized images running a single process is a best practice, which is a good practice when you’re running services.
But, Docker is also a great tool for building custom Linux distributions for your test lab very quickly, which is how I use it. You can build and test all kinds of crazy variations and run multiples at the same time with far fewer system resources than in virtual machines. Study the excellent Docker documentation to learn some of the subtle pitfalls and best practices.
Big? GitHub Enterprise 2.5 Thinks Massive
GitHub is focusing on enterprises with the biggest dev teams to ward off challenges from GitLab and Bitbucket.
Keeping up its push to be an enterprise presence, GitHub has announced the latest version of the for-pay, enterprise edition of its code-hosting platform. The company says GitHub Enterprise 2.5’s focus is “companies operating at massive scale” — enterprises with more than 10,000 developers and exponential year-over-year growth. The new toolset for GitHub Enterprise 2.5 helps large teams add new users, collaborate safely on large projects, and deal with GitHub-related performance issues that can crop up around such large projects.
Read more at InfoWorld
Installing Ubuntu MATE on a MacBook Pro with UEFI
Back in October, I explained how you can install Ubuntu on a Mac. It was a complete guide that included everything from dual-booting with OS X down to making sure the you’re able to use the right tools for the initial partitioning.
In this article, we take it to the next level by doing the same with an older MacBook Pro while still using UEFI ala rEFit. Note: rEFit has been depreciated and you may wish to try rEFind instead. For the sake of my tests, I found rEFit did the job just fine on under OS X Mavericks. (Read the rest)
Mentor Embedded Linux Adds SMACK Security and IoT Support
Mentor Graphics has updated Mentor Embedded Linux (MEL) with Yocto Project 2.0 code, SMACK security, and support for CANopen, BACNet, and 6LoWPAN. Mentor Graphics has spun a more secure and industrial IoT-ready version of its commercial Mentor Embedded Linux (MEL) distribution and development platform that moves up to a modern Linux codebase built around Yocto Project 2.0 (“Jethroâ€).
Google Has Quietly Launched Its Answer to AWS Lambda
The Google Cloud Platform, the public cloud infrastructure from Google that developers can use to build and run their own apps, last night released a fascinating service called Google Cloud Functions. The tool, which allows developers to set up functions that get triggered in response to certain events, is notable because it’s quite similar to the well-received Lambda service from public cloud market leader Amazon Web Services.
“Google Cloud Functions is a lightweight, event-based, asynchronous compute solution that allows you to create small, single-purpose functions that respond to cloud events …”
Read more at Venture Beat
LibreOffice 5.1 Officially Released with Redesigned User Interface, New Features
Today, February 10, The Document Foundation non-profit organization has proudly announced the release and immediate availability for download of the LibreOffice 5.1 open-source and cross-platform office suite for all supported platforms.
After being in development for the last three months or so, LibreOffice 5.1 comes today to a desktop environment near you with some of the most attractive features you’ve ever seen in an open-source office suite software product, no matter the operating system used.
GSMA Outlines Thoroughly Sensible IoT Security Rules
About time: the GSM Association has released a bunch of guidelines to try and address the chronic insecurity of the Internet of Things. The significance of the initiative is that it’s been agreed to by a collective of major carriers – the organisation’s announcement lists AT&T, China Telecom, Etisalat, KDDI, NTT DOCOMO, Orange, Telefónica, Telenor and Verizon but there are plenty of others.
With a common set of security recommendations, carriers will also have a stick they can wave at vendors that don’t care: do it right, or we won’t connect your stuff.
Read more at The Register
OpenSUSE Developers Tackle Redesigning YaST
For users of the rolling-release openSUSE Tumbleweed distribution, there has been a major rework of YaST taking place. YaST for the uninitiated is openSUSE/SUSE’s installation and configuration tool. The YaST setup tool offered a heck of a lot of options before while now it’s getting even better thanks to a recent development sprint.
First Timer’s Guide to FOSS Conferences
I’ve been going to FOSS (free and open source) conferences since 2006. My first open source conference was FreedomHEC in Seattle, a little 30-person conference for Linux users to protest Microsoft’s WinHEC. My next open source conference was OSCON, which had over a thousand attendees. They were both very different conferences, and as a college student, I really didn’t know what to expect. Going to your first open source conference can be intimidating, so I’ve complied ten tips for people who are new to the conference circuit.
Read more at OpenSource.com