Skip to content

Instantly share code, notes, and snippets.

@Mazyod
Last active January 5, 2016 19:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mazyod/9159d327643c615354bd to your computer and use it in GitHub Desktop.
Save Mazyod/9159d327643c615354bd to your computer and use it in GitHub Desktop.
Poco C++ Backend Starter Dockerfile
FROM ubuntu
MAINTAINER Maz Jaleel <mazjaleel@gmail.com>
# Install necessary tools to build Poco
RUN apt-get update && apt-get install -yq \
unzip wget build-essential cmake \
openssl libssl-dev \
unixODBC unixODBC-dev odbc-postgresql
# Download and work with Poco develop in the home directory
WORKDIR /home
RUN wget https://github.com/pocoproject/poco/archive/develop.zip && unzip develop.zip
# Configure and build Poco
WORKDIR /home/poco-develop
RUN ./configure --prefix=/usr --omit=Data/MySQL && make -j 4 && make install
# Setup the ODBC config with reasonable Postgres defaults
RUN echo '[defaultdb]\n\
Description = PostgreSQL connection to DefaultDB\n\
Driver = PostgreSQL Unicode\n\
Database = postgres\n\
Servername = postgres\n\
UserName = postgres\n\
Password = \n\
Port = 5432\n\
Protocol = 9.4\n\
ReadOnly = No\n\
RowVersioning = No\n\
ShowSystemTables = No\n\
ConnSettings =\n'\
>> /etc/odbc.ini
# Use bash when launching a container
CMD ["bash"]
@Mazyod
Copy link
Author

Mazyod commented Jan 5, 2016

Consider improving the configuration files to:

# Copy custom configuration file from the current directory
COPY odbc.ini /etc/odbc.ini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment