Skip to content

Commit

Permalink
feat: adding ssl compilation conf
Browse files Browse the repository at this point in the history
  • Loading branch information
3manuek committed Jun 30, 2024
1 parent 81161d0 commit e5227d9
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 4 deletions.
6 changes: 4 additions & 2 deletions 4.1.0/ubuntu/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN set -ex; \
RUN set -ex ; \
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
build-essential flex libxml2-dev libxml2-utils libc6-dev \
libxslt-dev libssl-dev \
libxslt-dev \
libreadline-dev zlib1g-dev libldap2-dev libpam0g-dev gettext \
uuid uuid-dev cmake lld apt-utils pkg-config libossp-uuid-dev gnulib bison git

Expand Down Expand Up @@ -106,6 +106,7 @@ RUN set -ex ; \
--with-uuid=ossp \
--enable-nls \
--with-libxslt \
--with-openssl \
--with-icu ${CONFIGURE_FLAGS}


Expand Down Expand Up @@ -142,7 +143,8 @@ ENV PGDATA="/var/lib/postgresql/data"
ENV DOCKER_ENTRYPOINT="/usr/local/bin/entrypoint.sh"

RUN apt-get update && \
apt-get install -y libxml2 libreadline8 tzdata libldap-2.4-2 libpython2.7 libxslt1.1 libossp-uuid16 && \
apt-get install -y --no-install-recommends \
libssl1.1 openssl libxml2 libreadline8 tzdata libldap-2.4-2 libpython2.7 libxslt1.1 libossp-uuid16 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
41 changes: 41 additions & 0 deletions freetds/ubuntu/focal/.freetds.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".

# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
tds version = auto

# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff

# Command and connection timeouts
; timeout = 10
; connect timeout = 10

# To reduce data sent from server for BLOBs (like TEXT or
# IMAGE) try setting 'text size' to a reasonable limit
; text size = 64512

# If you experience TLS handshake errors and are using openssl,
# try adjusting the cipher list (don't surround in double or single quotes)
# openssl ciphers = HIGH:!SSLv2:!aNULL:-DH

# A typical Sybase server
# [egServer50]
# host = symachine.domain.com
# port = 5000
# tds version = 5.0

# A typical Microsoft server
[bbf]
host = localhost
port = 1433
tds version = 7.3
8 changes: 8 additions & 0 deletions freetds/ubuntu/focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Image for spining the tdspool

FROM ubuntu:focal as base

LABEL org.opencontainers.image.authors="[email protected]"

RUN apt update && apt install -y freetds-bin

19 changes: 19 additions & 0 deletions freetds/ubuntu/focal/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -Eeo pipefail


# check to see if this file is being run or sourced from another script
_is_sourced() {
# https://unix.stackexchange.com/a/215279
[ "${#FUNCNAME[@]}" -ge 2 ] \
&& [ "${FUNCNAME[0]}" = '_is_sourced' ] \
&& [ "${FUNCNAME[1]}" = 'source' ]
}

_main(){
tdspool
}

if ! _is_sourced; then
_main "$@"
fi
15 changes: 15 additions & 0 deletions freetds/ubuntu/focal/pool.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[global]
min pool conn = 5
max pool conn = 10
max member age = 120


[clientpool]
server user = bbf
server password = password
server = bbf
user = bbf
database = bbf
password = password
max pool conn = 7
port = 5000
6 changes: 4 additions & 2 deletions templates/ubuntu/focal/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN set -ex; \
RUN set -ex ; \
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
build-essential flex libxml2-dev libxml2-utils libc6-dev \
libxslt-dev libssl-dev \
libxslt-dev \
libreadline-dev zlib1g-dev libldap2-dev libpam0g-dev gettext \
uuid uuid-dev cmake lld apt-utils pkg-config libossp-uuid-dev gnulib bison git

Expand Down Expand Up @@ -102,6 +102,7 @@ RUN set -ex ; \
--with-uuid=ossp \
--enable-nls \
--with-libxslt \
--with-openssl \
--with-icu ${CONFIGURE_FLAGS}


Expand Down Expand Up @@ -138,7 +139,8 @@ ENV PGDATA="/var/lib/postgresql/data"
ENV DOCKER_ENTRYPOINT="/usr/local/bin/entrypoint.sh"

RUN apt-get update && \
apt-get install -y libxml2 libreadline8 tzdata libldap-2.4-2 libpython2.7 libxslt1.1 libossp-uuid16 && \
apt-get install -y --no-install-recommends \
libssl1.1 openssl libxml2 libreadline8 tzdata libldap-2.4-2 libpython2.7 libxslt1.1 libossp-uuid16 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit e5227d9

Please sign in to comment.