This repository has been archived by the owner on Feb 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: refact debug level logs; bump ununtu image to 20.04; switch t…
…o non-root ubuntu container (#204) Refact debug level logs Bump ubuntu image to 20.04 Switch to non-root ubuntu container
- Loading branch information
Showing
3 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,32 +23,36 @@ ENV GOOS linux | |
|
||
RUN go build -v -ldflags "-X main.Version=${VERSION} -s -w" | ||
|
||
FROM ubuntu:18.04 | ||
FROM ubuntu:20.04 | ||
LABEL authors="Seth Miller,Yannig Perré" | ||
LABEL maintainer="Yannig Perré <[email protected]>" | ||
|
||
ENV VERSION ${VERSION:-0.1.0} | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY oracle-instantclient*${ORACLE_VERSION}*basic*.rpm / | ||
|
||
RUN apt-get -qq update && \ | ||
apt-get -qq install --no-install-recommends -qq libaio1 rpm -y && rpm -Uvh --nodeps /oracle*${ORACLE_VERSION}*rpm && \ | ||
apt-get -qq install --no-install-recommends tzdata libaio1 rpm -y && rpm -Uvh --nodeps /oracle*${ORACLE_VERSION}*rpm && \ | ||
rm -f /oracle*rpm | ||
|
||
RUN adduser --system --uid 1000 --group appuser \ | ||
&& usermod -a -G 0,appuser appuser | ||
|
||
ARG ORACLE_VERSION | ||
ENV ORACLE_VERSION=${ORACLE_VERSION} | ||
ENV LD_LIBRARY_PATH "/usr/lib/oracle/${ORACLE_VERSION}/client64/lib" | ||
RUN echo $LD_LIBRARY_PATH >> /etc/ld.so.conf.d/oracle.conf && ldconfig | ||
|
||
ARG LEGACY_TABLESPACE | ||
ENV LEGACY_TABLESPACE=${LEGACY_TABLESPACE} | ||
COPY --from=build /go/src/oracledb_exporter/oracledb_exporter /oracledb_exporter | ||
COPY --chown=appuser:appuser --from=build /go/src/oracledb_exporter/oracledb_exporter /oracledb_exporter | ||
ADD ./default-metrics${LEGACY_TABLESPACE}.toml /default-metrics.toml | ||
|
||
ENV DATA_SOURCE_NAME system/oracle@oracle/xe | ||
|
||
RUN chmod 755 /oracledb_exporter | ||
|
||
EXPOSE 9161 | ||
|
||
ENTRYPOINT ["/oracledb_exporter"] | ||
USER appuser | ||
|
||
ENTRYPOINT ["/oracledb_exporter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters