Browse Source

Update

tags/0.0.40^0
Peter Vivell 6 years ago
parent
commit
138f8bae00
2 changed files with 19 additions and 17 deletions
  1. 11
    8
      Dockerfile
  2. 8
    9
      drone.yml

+ 11
- 8
Dockerfile View File

@@ -1,13 +1,16 @@
1
-FROM debian:stable-slim
1
+FROM debian:stable-slim as builder # define builder target
2 2
 
3
-ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4
-ENV HOME /
3
+# Environment PATH HOME HOSTNAME
4
+# ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
5
+# ENV HOME /
5 6
 
6
-ARG BUILDDEPS
7
+# Prepare build dependencies and clean up
8
+ARG BUILD_DEPS
7 9
 RUN apt-get -q update && \
8 10
     DEBIAN_FRONTEND=noninteractive apt-get -qy upgrade && \
9
-    DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends ${BUILDDEPS} \
10
-        ca-certificates curl build-essential git && \
11
-    apt-get clean && rm -rf /var/lib/apt/lists/* && \
12
-        
11
+    DEBIAN_FRONTEND=noninteractive apt-get -qy install --no-install-recommends ${BUILD_DEPS} \
12
+        build-essential ca-certificates curl git iproute2 wget && \
13
+    apt-get clean && rm -rf /var/lib/apt/lists/*
14
+
15
+# Default command
13 16
 CMD ["bash"]

+ 8
- 9
drone.yml View File

@@ -16,31 +16,30 @@ steps:
16 16
   # http://plugins.drone.io/drone-plugins/drone-docker/
17 17
   # https://github.com/drone-plugins/drone-docker
18 18
   when:
19
-    event: [ tag ]
19
+    event: [ tag ] # [ push, tag ]
20 20
   settings:
21 21
     dry_run: false
22 22
     registry: reg.unino.de
23 23
     insecure: false
24
-    #auth: authtoken
24
+    #auth: authtoken for registry
25 25
     username: { from_secret: reg-user }
26 26
     password: { from_secret: reg-pass }
27 27
     repo: reg.unino.de/develop/debian-${DRONE_REPO_NAMESPACE}-${DRONE_REPO_NAME}
28 28
     #mirror: registry-1.docker.io/library/debian:stable-slim
29
-    #bip: 172.17.0.1/24
30
-    context: /drone
29
+    bip: 172.17.0.1/16
30
+    context: /drone # defaults to root of git repo
31 31
     #custom_dns: 127.0.0.11
32 32
     storage_driver: overlay2 # aufs, overlay or vfs
33 33
     #debug: true
34 34
     #launch_debug: true
35
-    #target: production # Dockerfile build target e.g. production, debug
35
+    target: builder # Dockerfile build target e.g. builder, debug, production
36 36
     dockerfile: Dockerfile
37 37
     auto_tag: false
38 38
     auto_tag_suffix: -linux-amd64
39 39
     force_tag: true
40
-    tags: [ latest ]
40
+    tags: [ latest, builder ]
41 41
     build_args:
42
-      - MAINTAINER=Drone CI/CD
43
-      - BUILDDEPS=libhidapi-dev libssl-dev zip
42
+      - BUILD_DEPS=libhidapi-dev libssl-dev zip
44 43
 
45 44
 
46 45
 - name: build
@@ -49,7 +48,7 @@ steps:
49 48
   # https://docs.drone.io/reference/environ/
50 49
   when:
51 50
     event: [ push, tag ]
52
-  depends_on: [ prepare ]
51
+  depends_on: [ clone, prepare ]
53 52
   environment:
54 53
     MAKEFLAGS: -j 1
55 54
   commands:

Loading…
Cancel
Save