Skip to content

Commit 370259f

Browse files
committed
most of vmware-archive#80 (took Dockerfile, Makefile and go.mod)
* Use go .12 and use modules instead of dep * Use a multistage Dockerfile to build/test the project * Updated the versions of: * Go: v1.9 -> v1.12.x * Alpine Linux: v3.6 -> v3.9. * Go dependencies, for example: k8s.io/client_go v5.0.0 -> v12.0.0 * version to 0.3 (from 0.2) Signed-off-by: Vigith Maurice <vigith@gmail.com>
2 parents 7310ab6 + 5655e74 commit 370259f

12,735 files changed

Lines changed: 544 additions & 4845363 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
FROM golang:1.12.9 AS build
1415

15-
FROM alpine:3.4
1616
MAINTAINER Timothy St. Clair "tstclair@heptio.com"
17+
WORKDIR /src/
18+
COPY . .
1719

20+
RUN CGO_ENABLED=0 go build -o /src/eventrouter
21+
22+
FROM alpine:3.9 as release
23+
24+
WORKDIR /app
1825
RUN apk update --no-cache && apk add ca-certificates
19-
ADD eventrouter /eventrouter
26+
COPY --from=build /src/eventrouter .
2027
USER nobody:nobody
2128

22-
CMD ["/bin/sh", "-c", "/eventrouter -v 3 -logtostderr"]
29+
ENTRYPOINT [ "./eventrouter" ]
30+
CMD ["-v", "3", "-logtostderr"]
2331

0 commit comments

Comments
 (0)