-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update dependencies for golang 1.21.3 version * Update dockerfile configuration * Update binary version for build container * Update badges docker images version to 1.1.9
- Loading branch information
Showing
18 changed files
with
981 additions
and
889 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
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 |
---|---|---|
|
@@ -20,8 +20,9 @@ RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ | |
|
||
|
||
### Binary ### | ||
# FROM golang:1.19.5-alpine3.17 | ||
FROM nginx:${NGINX_VERSION:-1.23-alpine} | ||
# FROM golang:${GOLANG_VERSION:-1.21.3-alpine3.18} | ||
# FROM nginx:${NGINX_VERSION:-1.25-alpine3.18} | ||
FROM nginx:${NGINX_VERSION:-1.25-alpine} | ||
|
||
ARG BUILD_DATE | ||
ARG BUILD_VERSION | ||
|
@@ -31,11 +32,11 @@ ARG GIT_URL | |
ENV VENDOR="DevOpsCornerId" | ||
ENV AUTHOR="DevOpsCorner.id <[email protected]>" | ||
ENV IMG_NAME="alpine" | ||
ENV IMG_VERSION="3.17" | ||
ENV IMG_DESC="Docker GO App Alpine 3.17" | ||
ENV IMG_VERSION="3.18" | ||
ENV IMG_DESC="Docker GO App Alpine 3.18" | ||
ENV IMG_ARCH="amd64/x86_64" | ||
|
||
ENV ALPINE_VERSION="3.17" | ||
ENV ALPINE_VERSION="3.18" | ||
|
||
LABEL maintainer="$AUTHOR" \ | ||
architecture="$IMG_ARCH" \ | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
### Builder Go ### | ||
FROM golang:alpine as builder-go | ||
|
||
WORKDIR /go/src/app | ||
ENV GIN_MODE=release | ||
ENV GOPATH=/go | ||
|
||
RUN apk add --no-cache \ | ||
build-base \ | ||
git \ | ||
curl \ | ||
make \ | ||
bash | ||
|
||
COPY src /go/src/app | ||
|
||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ | ||
cd /go/src/app && \ | ||
go build -mod=readonly -ldflags="-s -w" -o goapp | ||
|
||
|
||
### Binary ### | ||
# FROM golang:${GOLANG_VERSION:-1.21.3-alpine3.18} | ||
# FROM nginx:${NGINX_VERSION:-1.25-alpine3.18} | ||
FROM nginx:${NGINX_VERSION:-1.25-alpine} | ||
|
||
ARG BUILD_DATE | ||
ARG BUILD_VERSION | ||
ARG GIT_COMMIT | ||
ARG GIT_URL | ||
|
||
ENV VENDOR="DevOpsCornerId" | ||
ENV AUTHOR="DevOpsCorner.id <[email protected]>" | ||
ENV IMG_NAME="alpine" | ||
ENV IMG_VERSION="3.18" | ||
ENV IMG_DESC="Docker GO App Alpine 3.18" | ||
ENV IMG_ARCH="amd64/x86_64" | ||
|
||
ENV ALPINE_VERSION="3.18" | ||
|
||
LABEL maintainer="$AUTHOR" \ | ||
architecture="$IMG_ARCH" \ | ||
ubuntu-version="$ALPINE_VERSION" \ | ||
org.label-schema.build-date="$BUILD_DATE" \ | ||
org.label-schema.name="$IMG_NAME" \ | ||
org.label-schema.description="$IMG_DESC" \ | ||
org.label-schema.vcs-ref="$GIT_COMMIT" \ | ||
org.label-schema.vcs-url="$GIT_URL" \ | ||
org.label-schema.vendor="$VENDOR" \ | ||
org.label-schema.version="$BUILD_VERSION" \ | ||
org.label-schema.schema-version="$IMG_VERSION" \ | ||
org.opencontainers.image.authors="$AUTHOR" \ | ||
org.opencontainers.image.description="$IMG_DESC" \ | ||
org.opencontainers.image.vendor="$VENDOR" \ | ||
org.opencontainers.image.version="$IMG_VERSION" \ | ||
org.opencontainers.image.revision="$GIT_COMMIT" \ | ||
org.opencontainers.image.created="$BUILD_DATE" \ | ||
fr.hbis.docker.base.build-date="$BUILD_DATE" \ | ||
fr.hbis.docker.base.name="$IMG_NAME" \ | ||
fr.hbis.docker.base.vendor="$VENDOR" \ | ||
fr.hbis.docker.base.version="$BUILD_VERSION" | ||
|
||
ENV GIN_MODE=release | ||
|
||
RUN apk add --no-cache \ | ||
build-base \ | ||
git \ | ||
curl \ | ||
make \ | ||
bash \ | ||
nano | ||
|
||
# COPY --from=alpine/k8s:1.26.2 /usr/local/bin/ /usr/local/bin/ | ||
# COPY --from=devopscorner/aws-cli:latest /usr/local/aws-cli/ /usr/local/aws-cli/ | ||
# COPY --from=devopscorner/aws-cli:latest /aws-cli-bin/ /usr/local/bin/ | ||
COPY --from=devopscorner/cicd:alpine /root/.tfenv /root/.tfenv | ||
COPY --from=devopscorner/cicd:alpine /usr/local/bin/ /usr/local/bin/ | ||
COPY --from=devopscorner/cicd:alpine /usr/local/aws-cli/ /usr/local/aws-cli/ | ||
COPY --from=builder-go /go/src/app/goapp /usr/local/bin/k8s-context | ||
COPY --from=builder-go /go/src/app/goapp /usr/local/bin/kc | ||
COPY --from=builder-go /go/src/app/goapp /usr/local/bin/k8c | ||
|
||
EXPOSE 22 80 443 | ||
|
||
STOPSIGNAL SIGQUIT | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
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
Oops, something went wrong.