-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
112 lines (96 loc) · 5.38 KB
/
Dockerfile
File metadata and controls
112 lines (96 loc) · 5.38 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM ubuntu:bionic
MAINTAINER Gavin Jones <[email protected]>
# https://github.com/moby/moby/releases/
# https://download.docker.com/linux/static/stable/x86_64/
ENV DOCKER_VERSION 18.06.1-ce
# https://github.com/docker/compose/releases/
ENV DOCKER_COMPOSE_VERSION 1.22.0
# https://github.com/docker/machine/releases/
ENV DOCKER_MACHINE_VERSION 0.15.0
ENV MACH_ARCH x86_64
ENV TERM xterm
#To override if needed
ARG TAG=dev
ENV TAG ${TAG}
# https://www.microsoft.com/net/learn/get-started/linuxubuntu
ENV DOTNET_PACKAGE dotnet-sdk-2.1
# https://github.com/PowerShell/PowerShell/releases
# Use official list instead
#ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.2/powershell_6.0.0-beta.2-1ubuntu1.16.04.1_amd64.deb
ENV DISTRIB_CODENAME bionic
ENV DISTRIB_RELEASE 18.04
RUN apt-get update \
&& apt-get install -y git subversion nano wget curl iputils-ping dnsutils \
&& apt-get clean
#Docker bins
WORKDIR /home/toolbox/
# Try new URL
#RUN curl -L -o /tmp/docker-latest.tgz https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz && \
RUN curl -L -o /tmp/docker-latest.tgz https://download.docker.com/linux/static/stable/${MACH_ARCH}/docker-${DOCKER_VERSION}.tgz && \
tar -xvzf /tmp/docker-latest.tgz && \
mv docker/* /usr/bin/
#Docker compose
RUN curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
#Docker machine
RUN curl -L https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
#Minio tools
RUN curl -L https://dl.minio.io/server/minio/release/linux-amd64/minio > /usr/local/bin/minio && \
chmod +x /usr/local/bin/minio
RUN curl -L https://dl.minio.io/client/mc/release/linux-amd64/mc > /usr/local/bin/mc && \
chmod +x /usr/local/bin/mc
# Some other basic tools
RUN apt-get -y install apt-transport-https curl gnupg \
&& apt-get clean
#Mono dev needed for some things with .NET Core for the moment
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
&& echo "deb http://download.mono-project.com/repo/ubuntu $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/mono-official.list \
&& apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get -y install mono-devel \
&& apt-get clean
RUN cert-sync /etc/ssl/certs/ca-certificates.crt
# MS Certs and setup needed
RUN yes | certmgr -ssl -m https://go.microsoft.com \
yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net \
yes | certmgr -ssl -m https://nuget.org
#RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
# Register the Microsoft Ubuntu repository
#RUN apt-get install apt-transport-https curl -y && curl https://packages.microsoft.com/config/ubuntu/$DISTRIB_RELEASE/prod.list > /etc/apt/sources.list.d/microsoft.list
### Install .NET Core, nuget, PowerShell
RUN apt-get install apt-transport-https curl -y \
&& apt-get install --reinstall ca-certificates \
&& curl https://packages.microsoft.com/config/ubuntu/$DISTRIB_RELEASE/prod.list > /etc/apt/sources.list.d/microsoft.list \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& apt-get update \
#&& sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' \
&& sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list' \
&& wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get update \
# && apt-get install ca-certificates \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B02C46DF417A0893 \
&& apt-key adv --keyserver packages.microsoft.com --recv-keys EB3E94ADBE1229CF \
&& apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 \
# TODO: Fix issues with unauthenticated
&& apt-get install ${DOTNET_PACKAGE} --allow-unauthenticated -y \
&& apt-get install -y powershell \
&& mkdir /powershell \
&& DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata unzip nuget lastpass-cli \
&& apt-get clean
# uuencode/uudecode is useful
RUN apt-get install -y sharutils \
&& apt-get clean
### Set some environment variables
# RUN curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.deb \
# && apt-get install libunwind8 libicu55 \
# && dpkg --install powershell.deb \
# && rm powershell.deb \
# && apt-get clean
#Set PSGallery to trusted, and install PS module PSDepend by default
RUN pwsh -c "Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"
#RUN powershell -c "Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"
#PSDepend not currently working... Re-enable when it does
RUN pwsh -c "Install-Module -Name PSDepend; Import-Module PSDepend"
RUN echo $TAG >> build_tag