-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dwhgen
42 lines (35 loc) · 1.72 KB
/
Dockerfile.dwhgen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM golang:alpine AS terraform-bundler-build
RUN apk --no-cache add git unzip && \
go get -d -v github.com/hashicorp/terraform && \
go install ./src/github.com/hashicorp/terraform/tools/terraform-bundle
COPY terraform-bundle.hcl .
RUN terraform-bundle package terraform-bundle.hcl && \
mkdir -p terraform-bundle && \
unzip -d terraform-bundle terraform_*.zip
FROM python:3.7.4-slim-stretch
RUN apt-get update && apt-get install -y parallel pass curl apt-transport-https debconf-utils && rm -rf /var/lib/apt/lists/*
RUN curl -L -o /usr/local/bin/aws-vault https://github.com/99designs/aws-vault/releases/download/v4.6.4/aws-vault-linux-amd64
RUN chmod 755 /usr/local/bin/aws-vault
RUN export AWS_VAULT_BACKEND="pass"
RUN echo 'export AWS_VAULT_BACKEND="pass"' >> ~/.bashrc
RUN pip install dbt==0.14.0
RUN pip install s3cmd==2.0.2
# adding custom MS repository
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
# install SQL Server drivers and tools
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
RUN /bin/bash -c "source ~/.bashrc"
RUN apt-get -y install locales
RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
RUN /usr/sbin/locale-gen
RUN echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
RUN echo "export LANG=en_US.UTF-8" >> ~/.bashrc
RUN echo "export LANGUAGE=en_US.UTF-8" >> ~/.bashrc
RUN ln -s /opt/mssql-tools/bin/sqlcmd /bin/sqlcmd
RUN ln -s /opt/mssql-tools/bin/bcp /bin/bcp
COPY --from=terraform-bundler-build /go/terraform-bundle/* /usr/local/bin/
#
ADD mssql_up.sh /bin/
SHELL ["/bin/bash", "-c"]