Skip to content

Commit

Permalink
Merge pull request #90 from rebuy-de/improve-dockerfile
Browse files Browse the repository at this point in the history
improve Docker build
  • Loading branch information
svenwltr authored Nov 12, 2021
2 parents 64775ed + 18a9195 commit c5f6f36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/v2/dist
/v2/vendor
/dist
/vendor
13 changes: 3 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@ FROM golang:1.17-alpine as builder

RUN apk add --no-cache git curl openssl bash

# Install Go Tools
# RUN --mount=type=cache,id=go-build-cache,target=/root/.cache/go-build \
RUN GO111MODULE= go get -u golang.org/x/lint/golint

# Configure Go
ENV GOPATH= CGO_ENABLED=0 GO111MODULE=on

# Install Go Tools
RUN go install golang.org/x/lint/golint@latest

# Note: We need to copy the whole directory, because the .git directory needs
# to be part of the Docker context to determine the version.

COPY . /sdk

#RUN \
# --mount=type=cache,id=go-build-cache,target=/root/.cache/go-build \
# --mount=type=cache,id=go-pkg-cache,target=/go/pkg \
RUN \
set -e \
&& cd /sdk \
Expand All @@ -31,8 +27,5 @@ RUN \
WORKDIR /build

ONBUILD COPY . .
#ONBUILD RUN \
# --mount=type=cache,id=go-build-cache,target=/root/.cache/go-build \
# --mount=type=cache,id=go-pkg-cache,target=/go/pkg \
ONBUILD RUN \
buildutil
2 changes: 1 addition & 1 deletion buildutil
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

cd $(dirname "$0")

VERSION="v3.8.0"
VERSION="v3.11.0"

get_arch() {
ARCH=$(uname -m)
Expand Down

0 comments on commit c5f6f36

Please sign in to comment.