Layer consolidation
This commit is contained in:
		@@ -1,34 +1,27 @@
 | 
			
		||||
#-----------------------------------------------------------------------------------------
 | 
			
		||||
#-------------------------------------------------------------------------------------------------------------
 | 
			
		||||
# Copyright (c) Microsoft Corporation. All rights reserved.
 | 
			
		||||
# Licensed under the MIT License. See LICENSE in the project root for license information.
 | 
			
		||||
#-----------------------------------------------------------------------------------------
 | 
			
		||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
 | 
			
		||||
#-------------------------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
FROM golang:1
 | 
			
		||||
 | 
			
		||||
# Configure apt
 | 
			
		||||
# Avoid warnings by switching to noninteractive
 | 
			
		||||
ENV DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
 | 
			
		||||
# Configure apt, install packages and tools
 | 
			
		||||
RUN apt-get update \
 | 
			
		||||
    && apt-get -y install --no-install-recommends apt-utils 2>&1
 | 
			
		||||
 | 
			
		||||
# gocode-gomod
 | 
			
		||||
RUN go get -x -d github.com/stamblerre/gocode 2>&1 \
 | 
			
		||||
    && apt-get -y install --no-install-recommends apt-utils 2>&1 \
 | 
			
		||||
    #
 | 
			
		||||
    # Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
 | 
			
		||||
    && apt-get -y install git procps lsb-release \
 | 
			
		||||
    #
 | 
			
		||||
    # Install gocode-gomod
 | 
			
		||||
    && go get -x -d github.com/stamblerre/gocode 2>&1 \
 | 
			
		||||
    && go build -o gocode-gomod github.com/stamblerre/gocode \
 | 
			
		||||
    && mv gocode-gomod $GOPATH/bin/
 | 
			
		||||
 | 
			
		||||
# Install git, process tools, lsb-release (common in install instructions for CLIs)
 | 
			
		||||
RUN apt-get -y install git procps lsb-release
 | 
			
		||||
 | 
			
		||||
# Clean up
 | 
			
		||||
RUN apt-get autoremove -y \
 | 
			
		||||
    && apt-get clean -y \
 | 
			
		||||
    && rm -rf /var/lib/apt/lists/*
 | 
			
		||||
ENV DEBIAN_FRONTEND=dialog
 | 
			
		||||
 | 
			
		||||
# Set the default shell to bash rather than sh
 | 
			
		||||
ENV SHELL /bin/bash
 | 
			
		||||
 | 
			
		||||
# go tools
 | 
			
		||||
RUN go get -u -v \
 | 
			
		||||
    && mv gocode-gomod $GOPATH/bin/ \
 | 
			
		||||
    #
 | 
			
		||||
    # Install Go tools
 | 
			
		||||
    && go get -u -v \
 | 
			
		||||
        github.com/mdempsky/gocode \
 | 
			
		||||
        github.com/uudashr/gopkgs/cmd/gopkgs \
 | 
			
		||||
        github.com/ramya-rao-a/go-outline \
 | 
			
		||||
@@ -51,4 +44,9 @@ RUN go get -u -v \
 | 
			
		||||
        honnef.co/go/tools/... \
 | 
			
		||||
        github.com/golangci/golangci-lint/cmd/golangci-lint \
 | 
			
		||||
        github.com/mgechev/revive \
 | 
			
		||||
    github.com/derekparker/delve/cmd/dlv 2>&1
 | 
			
		||||
        github.com/derekparker/delve/cmd/dlv 2>&1 \
 | 
			
		||||
    #
 | 
			
		||||
    # Clean up
 | 
			
		||||
    && apt-get autoremove -y \
 | 
			
		||||
    && apt-get clean -y \
 | 
			
		||||
    && rm -rf /var/lib/apt/lists/*
 | 
			
		||||
		Reference in New Issue
	
	Block a user