Skip to content

Commit c1b8f14

Browse files
author
Christian González Di Antonio
committed
fixed docker container problem, and improved
1 parent ee3f0a5 commit c1b8f14

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

.github/workflows/master.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
run: ls -la .
7070

7171
- name: List .build Files
72-
run: ls -R .build
72+
run: ls -la .build
7373

7474
- name: Upload .build artifacts
7575
uses: actions/upload-artifact@v1
@@ -103,11 +103,14 @@ jobs:
103103
name: .build
104104
path: .build
105105

106+
- name: Assign Execution Permission to Binaries
107+
run: chmod -R +x .build/*/*
108+
106109
- name: List Workspace Files
107110
run: ls -la .
108111

109112
- name: List .build Files
110-
run: ls -R .build
113+
run: ls -la .build
111114

112115
- name: Build Docker Images
113116
run: make docker DOCKER_REPO=docker.io/slashdevops

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
run: ls -la .
5757

5858
- name: List .build Files
59-
run: ls -R .build
59+
run: ls -la .build
6060

6161
- name: Upload .build artifacts
6262
uses: actions/upload-artifact@v1
@@ -93,11 +93,14 @@ jobs:
9393
name: .build
9494
path: .build
9595

96+
- name: Assign Execution Permission to Binaries
97+
run: chmod -R +x .build/*/*
98+
9699
- name: List Workspace Files
97100
run: ls -la .
98101

99102
- name: List .build Files
100-
run: ls -R .build
103+
run: ls -la .build
101104

102105
- name: Set Env Var RELEASE_VERSION
103106
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
@@ -172,11 +175,14 @@ jobs:
172175
name: .build
173176
path: .build
174177

178+
- name: Assign Execution Permission to Binaries
179+
run: chmod -R +x .build/*/*
180+
175181
- name: List Workspace Files
176182
run: ls -la .
177183

178184
- name: List .build Files
179-
run: ls -R .build
185+
run: ls -la .build
180186

181187
- name: Build Tarballs Files
182188
run: promu crossbuild tarballs

Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
ARG ARCH="amd64"
22
ARG OS="linux"
33
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:glibc
4-
LABEL maintainer="Christian González Di Antonio <[email protected]>"
4+
5+
LABEL maintainer="Christian González Di Antonio <[email protected]>" \
6+
org.opencontainers.image.authors="Christian González Di Antonio <[email protected]>" \
7+
org.opencontainers.image.url="https://github.com/slashdevops/aws_cloudwatch_exporter" \
8+
org.opencontainers.image.documentation="https://github.com/slashdevops/aws_cloudwatch_exporter" \
9+
org.opencontainers.image.source="https://github.com/slashdevops/aws_cloudwatch_exporter" \
10+
org.opencontainers.image.licenses="Apache License Version 2.0" \
11+
org.opencontainers.image.title="AWS CloudWatch exporter for prometheus.io" \
12+
org.opencontainers.image.description="AWS CloudWatch exporter for prometheus.io"
513

614
ARG ARCH="amd64"
715
ARG OS="linux"
816
COPY .build/${OS}-${ARCH}/aws_cloudwatch_exporter /bin/aws_cloudwatch_exporter
917

1018
EXPOSE 9690
1119
USER nobody
20+
1221
HEALTHCHECK CMD wget --spider -S "http://localhost:9690/health" -T 60 2>&1 || exit 1
22+
23+
VOLUME "/etc/aws_cloudwatch_exporter"
24+
1325
ENTRYPOINT [ "/bin/aws_cloudwatch_exporter" ]

cmd/root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ func loadFromConfigFiles(fileName string, c *config.All) {
162162
// viper.SetConfigName(fileNameNoExt)
163163
viper.SetConfigName(filepath.Base(fileName))
164164
viper.AddConfigPath(filepath.Dir(fileName))
165+
viper.AddConfigPath("/etc/" + appName)
166+
viper.AddConfigPath(".")
165167
viper.SetConfigType(filepath.Ext(fileName)[1:])
166168

167169
// Read env vars equals as the mapstructure defined into the config.go

0 commit comments

Comments
 (0)