forked from CircleCI-Archived/dockerfile-wizard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile2
133 lines (110 loc) · 4.59 KB
/
Dockerfile2
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
FROM ubuntu:18.04
RUN apt-get -q update && \
apt-get -q install -y --no-install-recommends ca-certificates file g++ git locales make uuid-runtime \
libc6-dev \
clang \
curl \
libedit-dev \
libpython2.7 \
libicu-dev \
libssl-dev \
libxml2 \
git \
libcurl4-openssl-dev \
pkg-config
ARG SWIFT_PLATFORM=ubuntu16.04
ARG SWIFT_BRANCH=swift-4.1.3-release
ARG SWIFT_VERSION=swift-4.1.3-RELEASE
ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \
SWIFT_BRANCH=$SWIFT_BRANCH \
SWIFT_VERSION=$SWIFT_VERSION
RUN SWIFT_URL=https://swift.org/builds/swift-4.2-release/ubuntu1804/swift-4.2-RELEASE/swift-4.2-RELEASE-ubuntu18.04.tar.gz \
&& curl -fSsL $SWIFT_URL -o swift.tar.gz \
&& curl -fSsL $SWIFT_URL.sig -o swift.tar.gz.sig \
# && export GNUPGHOME="$(mktemp -d)" \
# && set -e; \
# for key in \
# # pub rsa4096 2017-11-07 [SC] [expires: 2019-11-07]
# # 8513444E2DA36B7C1659AF4D7638F1FB2B2B08C4
# # uid [ unknown] Swift Automatic Signing Key #2 <[email protected]>
# 8513444E2DA36B7C1659AF4D7638F1FB2B2B08C4 \
# # pub 4096R/91D306C6 2016-05-31 [expires: 2018-05-31]
# # Key fingerprint = A3BA FD35 56A5 9079 C068 94BD 63BC 1CFE 91D3 06C6
# # uid Swift 3.x Release Signing Key <[email protected]>
# A3BAFD3556A59079C06894BD63BC1CFE91D306C6 \
# # pub 4096R/71E1B235 2016-05-31 [expires: 2019-06-14]
# # Key fingerprint = 5E4D F843 FB06 5D7F 7E24 FBA2 EF54 30F0 71E1 B235
# # uid Swift 4.x Release Signing Key <[email protected]>
# 5E4DF843FB065D7F7E24FBA2EF5430F071E1B235 \
# ; do \
# gpg --quiet --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
# done \
# && gpg --batch --verify --quiet swift.tar.gz.sig swift.tar.gz \
&& tar -xzf swift.tar.gz --directory / --strip-components=1 \
# && rm -r "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
&& chmod -R o+r /usr/lib/swift
RUN swift --version
RUN git clone https://github.com/realm/SwiftLint.git
WORKDIR "SwiftLint"
RUN git submodule update --init --recursive
RUN apt-get install wget -y && wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
RUN dpkg -i libicu55_55.1-7_amd64.deb
# RUN apt install curl -y
RUN make install
RUN swiftlint version
RUN cd ..
RUN rm -rf SwiftLint
RUN apt-get clean \
&& apt-get -q install -y sudo \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& useradd -m -s /bin/bash linuxbrew \
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
USER linuxbrew
WORKDIR /home/linuxbrew
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/linuxbrew/usr/bin:$PATH \
SHELL=/bin/bash
RUN git clone https://github.com/Linuxbrew/brew.git /home/linuxbrew/.linuxbrew/Homebrew \
&& mkdir /home/linuxbrew/.linuxbrew/bin \
&& ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \
&& brew config
# RUN sudo apt-get update && sudo apt install libcurl4-openssl-dev -y
RUN wget http://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.gz && \
tar -xzvf ruby-2.4.0.tar.gz && \
cd ruby-2.4.0/ && \
./configure && \
sudo make -j4 && \
sudo make install && \
ruby -v
RUN brew install imagemagick
RUN brew install librsvg
RUN sudo gem install bundle
COPY Gemfile ./
COPY fastlane/Pluginfile ./fastlane
RUN bundle install
RUN swiftlint version
RUN swift --version
# RUN sudo apt-get install -y apt-utils git-core
# RUN apt-get install -y
# RUN sudo apt-get -f install
# RUN sudo apt-get update
# RUN sudo apt-get install -y wget clang libblocksruntime0 libcurl4-openssl-dev libicu-dev
# # RUN sudo apt-get upgrade -y libstdc++6
# # # RUN sudo apt-get upgrade -y
# RUN strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
# RUN sudo curl https://swift.org/builds/swift-4.2-release/ubuntu1804/swift-4.2-RELEASE/swift-4.2-RELEASE-ubuntu18.04.tar.gz | tar xz --directory /home/linuxbrew --strip-components=1
# # RUN cd ./usr/lib && ls
# # RUN sudo apt-get upgrade -y libstdc++6
# # RUN sudo apt-get install libtinfo5
# RUN sudo apt-get install -y libpython2.7 libbsd0
# RUN git clone https://github.com/realm/SwiftLint.git
# ENV LINUX_SOURCEKIT_LIB_PATH=/home/linuxbrew/usr/lib
# WORKDIR "SwiftLint"
# # RUN git reset --hard 0.25.1
# RUN swift
# RUN sudo git submodule update --init --recursive; sudo make install
# RUN swiftlint version
# # RUN swift run -c release swiftlint
# # RUN mv .build/x86_64-unknown-linux/release/swiftlint /usr/local/bin/
# # RUN cd ..
# RUN rm -rf SwiftLint