ddtrace 0.43.0 → 0.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +100 -129
- data/.circleci/images/primary/Dockerfile-3.0.0 +73 -0
- data/.github/workflows/add-milestone-to-pull-requests.yml +1 -1
- data/.simplecov +4 -1
- data/Appraisals +200 -8
- data/CHANGELOG.md +1005 -376
- data/Gemfile +4 -2
- data/Rakefile +121 -4
- data/ddtrace.gemspec +5 -8
- data/docker-compose.yml +30 -0
- data/docs/GettingStarted.md +47 -8
- data/lib/ddtrace.rb +1 -0
- data/lib/ddtrace/contrib/action_view/event.rb +0 -4
- data/lib/ddtrace/contrib/action_view/events/render_partial.rb +1 -0
- data/lib/ddtrace/contrib/action_view/events/render_template.rb +1 -0
- data/lib/ddtrace/contrib/active_record/utils.rb +11 -1
- data/lib/ddtrace/contrib/aws/services.rb +1 -0
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +2 -0
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +1 -1
- data/lib/ddtrace/contrib/ethon/ext.rb +1 -0
- data/lib/ddtrace/contrib/grape/endpoint.rb +29 -11
- data/lib/ddtrace/contrib/grape/ext.rb +1 -0
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/qless/configuration/settings.rb +35 -0
- data/lib/ddtrace/contrib/qless/ext.rb +20 -0
- data/lib/ddtrace/contrib/qless/integration.rb +38 -0
- data/lib/ddtrace/contrib/qless/patcher.rb +35 -0
- data/lib/ddtrace/contrib/qless/qless_job.rb +72 -0
- data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +32 -0
- data/lib/ddtrace/contrib/redis/configuration/resolver.rb +3 -1
- data/lib/ddtrace/contrib/redis/configuration/settings.rb +5 -0
- data/lib/ddtrace/contrib/redis/ext.rb +1 -0
- data/lib/ddtrace/contrib/redis/patcher.rb +20 -3
- data/lib/ddtrace/contrib/redis/quantize.rb +27 -0
- data/lib/ddtrace/contrib/redis/tags.rb +5 -1
- data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +2 -2
- data/lib/ddtrace/ext/ci.rb +0 -1
- data/lib/ddtrace/version.rb +1 -1
- data/lib/ddtrace/workers/runtime_metrics.rb +7 -3
- metadata +77 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9bab61fb7855f2281cbaa808536cc7f7f6fe857657c49f91b532e6780c05187f
|
4
|
+
data.tar.gz: 463065e1f917522e19b2ace842cf117bfaf747b2e41e2bae405073080cf6f077
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 688c0fb395d61cb53609eb872f32eba8337c810d7d83d4751822e31487a34cf5322284f025b512bc3e7251369406b77467754aecf327403dcf0128fcfebbdfc6
|
7
|
+
data.tar.gz: a484ea8f729a3736209c8182ea729e7e2f9475eff4742d366f1824b8d50bf78ebd92d0eb4afbf0c6fc01e2bedcb0e553d11c246e2cbcfd299d64819e64902d99
|
data/.circleci/config.yml
CHANGED
@@ -2,13 +2,41 @@ version: 2.1
|
|
2
2
|
|
3
3
|
# Common variables, containers, jobs and steps.
|
4
4
|
job_defaults: &job_defaults
|
5
|
+
# TODO: We should move away from using a directory
|
6
|
+
# TODO: that requires root permission to be created.
|
7
|
+
# TODO: Changing this requires rebuilding all docker images.
|
5
8
|
working_directory: /app
|
6
9
|
shell: /bin/bash --login
|
7
10
|
|
8
11
|
test_containers:
|
12
|
+
- &job_parameters
|
13
|
+
parameters:
|
14
|
+
ruby_version:
|
15
|
+
description: Ruby version
|
16
|
+
type: string
|
17
|
+
image:
|
18
|
+
description: Docker image location
|
19
|
+
type: string
|
20
|
+
jit:
|
21
|
+
description: Jit enabled?
|
22
|
+
type: boolean
|
23
|
+
default: false
|
24
|
+
- &container_base_environment
|
25
|
+
BUNDLE_GEMFILE: /app/Gemfile
|
26
|
+
- &container_parameters_environment
|
27
|
+
- *container_base_environment
|
28
|
+
- RUBY_OPT: <<# parameters.jit >>--jit<</ parameters.jit >>
|
29
|
+
- TEST_DATADOG_INTEGRATION: 1
|
30
|
+
- COVERAGE_BASE_DIR: coverage
|
9
31
|
- &container_base
|
32
|
+
image: <<parameters.image>>
|
10
33
|
environment:
|
11
|
-
|
34
|
+
*container_parameters_environment
|
35
|
+
- &test_job_default
|
36
|
+
<<: *job_defaults
|
37
|
+
<<: *job_parameters
|
38
|
+
docker:
|
39
|
+
- *container_base
|
12
40
|
- &container_postgres
|
13
41
|
image: postgres:9.6
|
14
42
|
environment:
|
@@ -88,41 +116,13 @@ filters_only_release_tags: &filters_only_release_tags
|
|
88
116
|
orbs:
|
89
117
|
orb:
|
90
118
|
jobs:
|
91
|
-
checkout:
|
92
|
-
<<: *job_defaults
|
93
|
-
parameters:
|
94
|
-
ruby_version:
|
95
|
-
description: Ruby version
|
96
|
-
type: string
|
97
|
-
image:
|
98
|
-
description: Docker image location
|
99
|
-
type: string
|
100
|
-
docker:
|
101
|
-
- <<: *container_base
|
102
|
-
image: <<parameters.image>>
|
103
|
-
steps:
|
104
|
-
- checkout
|
105
|
-
- save_cache:
|
106
|
-
key: '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
|
107
|
-
paths:
|
108
|
-
- /app
|
109
119
|
build:
|
110
|
-
<<: *
|
111
|
-
parameters:
|
112
|
-
ruby_version:
|
113
|
-
description: Ruby version
|
114
|
-
type: string
|
115
|
-
image:
|
116
|
-
description: Docker image location
|
117
|
-
type: string
|
118
|
-
docker:
|
119
|
-
- <<: *container_base
|
120
|
-
image: <<parameters.image>>
|
120
|
+
<<: *test_job_default
|
121
121
|
steps:
|
122
|
+
- checkout
|
122
123
|
- restore_cache:
|
123
124
|
keys:
|
124
125
|
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
|
125
|
-
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
|
126
126
|
- restore_cache:
|
127
127
|
keys:
|
128
128
|
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "Appraisals" }}-{{ checksum "ddtrace.gemspec" }}
|
@@ -148,21 +148,9 @@ orbs:
|
|
148
148
|
paths:
|
149
149
|
- /usr/local/bundle
|
150
150
|
test:
|
151
|
-
<<: *
|
152
|
-
parameters:
|
153
|
-
ruby_version:
|
154
|
-
description: Ruby version
|
155
|
-
type: string
|
156
|
-
image:
|
157
|
-
description: Docker image location
|
158
|
-
type: string
|
151
|
+
<<: *test_job_default
|
159
152
|
docker:
|
160
153
|
- <<: *container_base
|
161
|
-
image: <<parameters.image>>
|
162
|
-
environment:
|
163
|
-
- BUNDLE_GEMFILE: /app/Gemfile
|
164
|
-
- TEST_DATADOG_INTEGRATION: 1
|
165
|
-
- COVERAGE_BASE_DIR: coverage
|
166
154
|
- *container_postgres
|
167
155
|
- *container_presto
|
168
156
|
- *container_mysql
|
@@ -190,20 +178,9 @@ orbs:
|
|
190
178
|
paths:
|
191
179
|
- coverage
|
192
180
|
benchmark:
|
193
|
-
<<: *
|
194
|
-
parameters:
|
195
|
-
ruby_version:
|
196
|
-
description: Ruby version
|
197
|
-
type: string
|
198
|
-
image:
|
199
|
-
description: Docker image location
|
200
|
-
type: string
|
181
|
+
<<: *test_job_default
|
201
182
|
docker:
|
202
183
|
- <<: *container_base
|
203
|
-
image: <<parameters.image>>
|
204
|
-
environment:
|
205
|
-
- BUNDLE_GEMFILE: /app/Gemfile
|
206
|
-
- TEST_DATADOG_INTEGRATION: 1
|
207
184
|
- *container_postgres
|
208
185
|
- *container_redis
|
209
186
|
- *container_agent
|
@@ -221,19 +198,7 @@ orbs:
|
|
221
198
|
name: Run Benchmark without ddtracer
|
222
199
|
command: rm -f lib/ddtrace.rb && bundle exec appraisal rails5-postgres-sidekiq ruby benchmarks/sidekiq_test.rb 2>&1 1> /dev/null | tee benchmark_results.csv
|
223
200
|
lint:
|
224
|
-
<<: *
|
225
|
-
parameters:
|
226
|
-
ruby_version:
|
227
|
-
description: Ruby version
|
228
|
-
type: string
|
229
|
-
image:
|
230
|
-
description: Docker image location
|
231
|
-
type: string
|
232
|
-
docker:
|
233
|
-
- <<: *container_base
|
234
|
-
image: <<parameters.image>>
|
235
|
-
environment:
|
236
|
-
- BUNDLE_GEMFILE: /app/Gemfile
|
201
|
+
<<: *test_job_default
|
237
202
|
steps:
|
238
203
|
- restore_cache:
|
239
204
|
keys:
|
@@ -243,19 +208,7 @@ orbs:
|
|
243
208
|
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
|
244
209
|
- *step_rubocop
|
245
210
|
coverage:
|
246
|
-
<<: *
|
247
|
-
parameters:
|
248
|
-
ruby_version:
|
249
|
-
description: Ruby version
|
250
|
-
type: string
|
251
|
-
image:
|
252
|
-
description: Docker image location
|
253
|
-
type: string
|
254
|
-
docker:
|
255
|
-
- <<: *container_base
|
256
|
-
image: <<parameters.image>>
|
257
|
-
environment:
|
258
|
-
- BUNDLE_GEMFILE: /app/Gemfile
|
211
|
+
<<: *test_job_default
|
259
212
|
steps:
|
260
213
|
- restore_cache:
|
261
214
|
keys:
|
@@ -265,6 +218,9 @@ orbs:
|
|
265
218
|
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
|
266
219
|
- attach_workspace:
|
267
220
|
at: /tmp/workspace
|
221
|
+
- run:
|
222
|
+
name: Install codecov
|
223
|
+
command: bundle add codecov
|
268
224
|
- run:
|
269
225
|
name: Generate coverage report artifact "coverage/index.html"
|
270
226
|
command: COVERAGE_DIR=/tmp/workspace/coverage bundle exec rake coverage:report
|
@@ -274,6 +230,26 @@ orbs:
|
|
274
230
|
- store_artifacts:
|
275
231
|
path: /tmp/workspace/coverage/report/
|
276
232
|
destination: coverage
|
233
|
+
changelog:
|
234
|
+
<<: *test_job_default
|
235
|
+
steps:
|
236
|
+
- restore_cache:
|
237
|
+
keys:
|
238
|
+
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
|
239
|
+
- restore_cache:
|
240
|
+
keys:
|
241
|
+
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
|
242
|
+
- attach_workspace:
|
243
|
+
at: /tmp/workspace
|
244
|
+
- run:
|
245
|
+
name: Format changelog
|
246
|
+
command: bundle exec rake changelog:format
|
247
|
+
- run:
|
248
|
+
name: Check if changelog was unformatted
|
249
|
+
command: |
|
250
|
+
if ! git diff-files --quiet; then
|
251
|
+
echo "Please run 'bundle exec rake changelog:format' and commit the results."
|
252
|
+
fi
|
277
253
|
commands:
|
278
254
|
executors:
|
279
255
|
|
@@ -281,7 +257,8 @@ jobs:
|
|
281
257
|
"deploy release":
|
282
258
|
<<: *job_defaults
|
283
259
|
docker:
|
284
|
-
-
|
260
|
+
- environment:
|
261
|
+
*container_base_environment
|
285
262
|
image: marcotc/docker-library:ddtrace_rb_2_5_6
|
286
263
|
steps:
|
287
264
|
- checkout
|
@@ -301,7 +278,8 @@ jobs:
|
|
301
278
|
"deploy prerelease Gem":
|
302
279
|
<<: *job_defaults
|
303
280
|
docker:
|
304
|
-
-
|
281
|
+
- environment:
|
282
|
+
*container_base_environment
|
305
283
|
image: marcotc/docker-library:ddtrace_rb_2_5_6
|
306
284
|
steps:
|
307
285
|
- run:
|
@@ -367,6 +345,15 @@ job_configuration:
|
|
367
345
|
<<: *filters_all_branches_and_tags
|
368
346
|
ruby_version: '2.7'
|
369
347
|
image: marcotc/docker-library:ddtrace_rb_2_7_0
|
348
|
+
- &config-3_0
|
349
|
+
<<: *filters_all_branches_and_tags
|
350
|
+
ruby_version: '3.0'
|
351
|
+
image: marcotc/docker-library:ddtrace_rb_3.0.0
|
352
|
+
- &config-3_0-jit
|
353
|
+
<<: *filters_all_branches_and_tags
|
354
|
+
ruby_version: '3.0'
|
355
|
+
image: marcotc/docker-library:ddtrace_rb_3.0.0
|
356
|
+
jit: true
|
370
357
|
# JRuby
|
371
358
|
- &config-jruby-9_2
|
372
359
|
<<: *filters_all_branches_and_tags
|
@@ -394,55 +381,44 @@ workflows:
|
|
394
381
|
- test-2.5
|
395
382
|
- test-2.6
|
396
383
|
- test-2.7
|
384
|
+
- test-3.0
|
397
385
|
- test-jruby-9.2
|
386
|
+
- orb/changelog:
|
387
|
+
<<: *config-2_7
|
388
|
+
name: changelog
|
389
|
+
requires:
|
390
|
+
- build-2.7
|
391
|
+
filters:
|
392
|
+
branches:
|
393
|
+
only: /bump_to_version_.*/
|
398
394
|
# MRI
|
399
|
-
- orb/checkout:
|
400
|
-
<<: *config-2_0
|
401
|
-
name: checkout-2.0
|
402
395
|
- orb/build:
|
403
396
|
<<: *config-2_0
|
404
397
|
name: build-2.0
|
405
|
-
requires:
|
406
|
-
- checkout-2.0
|
407
398
|
- orb/test:
|
408
399
|
<<: *config-2_0
|
409
400
|
name: test-2.0
|
410
401
|
requires:
|
411
402
|
- build-2.0
|
412
|
-
- orb/checkout:
|
413
|
-
<<: *config-2_1
|
414
|
-
name: checkout-2.1
|
415
403
|
- orb/build:
|
416
404
|
<<: *config-2_1
|
417
405
|
name: build-2.1
|
418
|
-
requires:
|
419
|
-
- checkout-2.1
|
420
406
|
- orb/test:
|
421
407
|
<<: *config-2_1
|
422
408
|
name: test-2.1
|
423
409
|
requires:
|
424
410
|
- build-2.1
|
425
|
-
- orb/checkout:
|
426
|
-
<<: *config-2_2
|
427
|
-
name: checkout-2.2
|
428
411
|
- orb/build:
|
429
412
|
<<: *config-2_2
|
430
413
|
name: build-2.2
|
431
|
-
requires:
|
432
|
-
- checkout-2.2
|
433
414
|
- orb/test:
|
434
415
|
<<: *config-2_2
|
435
416
|
name: test-2.2
|
436
417
|
requires:
|
437
418
|
- build-2.2
|
438
|
-
- orb/checkout:
|
439
|
-
<<: *config-2_3
|
440
|
-
name: checkout-2.3
|
441
419
|
- orb/build:
|
442
420
|
<<: *config-2_3
|
443
421
|
name: build-2.3
|
444
|
-
requires:
|
445
|
-
- checkout-2.3
|
446
422
|
- orb/test:
|
447
423
|
<<: *config-2_3
|
448
424
|
name: test-2.3
|
@@ -453,67 +429,58 @@ workflows:
|
|
453
429
|
name: benchmark-2.3
|
454
430
|
requires:
|
455
431
|
- build-2.3
|
456
|
-
- orb/checkout:
|
457
|
-
<<: *config-2_4
|
458
|
-
name: checkout-2.4
|
459
432
|
- orb/build:
|
460
433
|
<<: *config-2_4
|
461
434
|
name: build-2.4
|
462
|
-
requires:
|
463
|
-
- checkout-2.4
|
464
435
|
- orb/test:
|
465
436
|
<<: *config-2_4
|
466
437
|
name: test-2.4
|
467
438
|
requires:
|
468
439
|
- build-2.4
|
469
|
-
- orb/checkout:
|
470
|
-
<<: *config-2_5
|
471
|
-
name: checkout-2.5
|
472
440
|
- orb/build:
|
473
441
|
<<: *config-2_5
|
474
442
|
name: build-2.5
|
475
|
-
requires:
|
476
|
-
- checkout-2.5
|
477
443
|
- orb/test:
|
478
444
|
<<: *config-2_5
|
479
445
|
name: test-2.5
|
480
446
|
requires:
|
481
447
|
- build-2.5
|
482
|
-
- orb/checkout:
|
483
|
-
<<: *config-2_6
|
484
|
-
name: checkout-2.6
|
485
448
|
- orb/build:
|
486
449
|
<<: *config-2_6
|
487
450
|
name: build-2.6
|
488
|
-
requires:
|
489
|
-
- checkout-2.6
|
490
451
|
- orb/test:
|
491
452
|
<<: *config-2_6
|
492
453
|
name: test-2.6
|
493
454
|
requires:
|
494
455
|
- build-2.6
|
495
|
-
- orb/checkout:
|
496
|
-
<<: *config-2_7
|
497
|
-
name: checkout-2.7
|
498
456
|
- orb/build:
|
499
457
|
<<: *config-2_7
|
500
458
|
name: build-2.7
|
501
|
-
requires:
|
502
|
-
- checkout-2.7
|
503
459
|
- orb/test:
|
504
460
|
<<: *config-2_7
|
505
461
|
name: test-2.7
|
506
462
|
requires:
|
507
463
|
- build-2.7
|
464
|
+
- orb/build:
|
465
|
+
<<: *config-3_0
|
466
|
+
name: build-3.0
|
467
|
+
- orb/test:
|
468
|
+
<<: *config-3_0
|
469
|
+
name: test-3.0
|
470
|
+
requires:
|
471
|
+
- build-3.0
|
472
|
+
- orb/build:
|
473
|
+
<<: *config-3_0-jit
|
474
|
+
name: build-3.0-jit
|
475
|
+
- orb/test:
|
476
|
+
<<: *config-3_0-jit
|
477
|
+
name: test-3.0-jit
|
478
|
+
requires:
|
479
|
+
- build-3.0-jit
|
508
480
|
# JRuby
|
509
|
-
- orb/checkout:
|
510
|
-
<<: *config-jruby-9_2
|
511
|
-
name: checkout-jruby-9.2
|
512
481
|
- orb/build:
|
513
482
|
<<: *config-jruby-9_2
|
514
483
|
name: build-jruby-9.2
|
515
|
-
requires:
|
516
|
-
- checkout-jruby-9.2
|
517
484
|
- orb/test:
|
518
485
|
<<: *config-jruby-9_2
|
519
486
|
name: test-jruby-9.2
|
@@ -532,6 +499,8 @@ workflows:
|
|
532
499
|
- test-2.5
|
533
500
|
- test-2.6
|
534
501
|
- test-2.7
|
502
|
+
- test-3.0
|
503
|
+
- test-3.0-jit
|
535
504
|
- test-jruby-9.2
|
536
505
|
- "deploy release":
|
537
506
|
<<: *filters_only_release_tags
|
@@ -545,4 +514,6 @@ workflows:
|
|
545
514
|
- test-2.5
|
546
515
|
- test-2.6
|
547
516
|
- test-2.7
|
517
|
+
- test-3.0
|
518
|
+
- test-3.0-jit
|
548
519
|
- test-jruby-9.2
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# https://hub.docker.com/layers/ruby/library/ruby/3.0.0/images/sha256-9719b7df964602b114a5e9319bd0a3ce2d4d44ccb7ea4d1702fa1ef9742a8f84
|
2
|
+
FROM ruby@sha256:9719b7df964602b114a5e9319bd0a3ce2d4d44ccb7ea4d1702fa1ef9742a8f84
|
3
|
+
|
4
|
+
# Make apt non-interactive
|
5
|
+
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
|
6
|
+
&& echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90circleci
|
7
|
+
|
8
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
9
|
+
|
10
|
+
# Install required packages
|
11
|
+
RUN set -ex; \
|
12
|
+
apt-get update; \
|
13
|
+
mkdir -p /usr/share/man/man1; \
|
14
|
+
apt-get install -y --no-install-recommends \
|
15
|
+
git mercurial xvfb \
|
16
|
+
locales sudo openssh-client ca-certificates tar gzip parallel \
|
17
|
+
net-tools netcat unzip zip bzip2 gnupg curl wget \
|
18
|
+
tzdata rsync vim; \
|
19
|
+
rm -rf /var/lib/apt/lists/*;
|
20
|
+
|
21
|
+
# Set timezone to UTC by default
|
22
|
+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
23
|
+
|
24
|
+
# Set language
|
25
|
+
RUN locale-gen en_US.UTF-8
|
26
|
+
ENV LANG en_US.UTF-8
|
27
|
+
ENV LANGUAGE en_US:en
|
28
|
+
|
29
|
+
# Install jq
|
30
|
+
RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \
|
31
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \
|
32
|
+
&& chmod +x /usr/bin/jq \
|
33
|
+
&& jq --version
|
34
|
+
|
35
|
+
# Install Docker
|
36
|
+
RUN set -ex \
|
37
|
+
&& export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \
|
38
|
+
&& DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \
|
39
|
+
&& echo Docker URL: $DOCKER_URL \
|
40
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \
|
41
|
+
&& ls -lha /tmp/docker.tgz \
|
42
|
+
&& tar -xz -C /tmp -f /tmp/docker.tgz \
|
43
|
+
&& mv /tmp/docker/* /usr/bin \
|
44
|
+
&& rm -rf /tmp/docker /tmp/docker.tgz \
|
45
|
+
&& which docker \
|
46
|
+
&& (docker version || true)
|
47
|
+
|
48
|
+
# Install Docker Compose
|
49
|
+
RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \
|
50
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \
|
51
|
+
&& chmod +x /usr/bin/docker-compose \
|
52
|
+
&& docker-compose version
|
53
|
+
|
54
|
+
# Install Dockerize
|
55
|
+
RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \
|
56
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \
|
57
|
+
&& tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \
|
58
|
+
&& rm -rf /tmp/dockerize-linux-amd64.tar.gz \
|
59
|
+
&& dockerize --version
|
60
|
+
|
61
|
+
# Install RubyGems
|
62
|
+
RUN gem update --system
|
63
|
+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
|
64
|
+
|
65
|
+
# Upgrade RubyGems and Bundler
|
66
|
+
RUN gem update --system
|
67
|
+
RUN gem install bundler
|
68
|
+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
|
69
|
+
|
70
|
+
RUN mkdir /app
|
71
|
+
WORKDIR /app
|
72
|
+
|
73
|
+
CMD ["/bin/sh"]
|