Skip to content

Commit

Permalink
most of vmware-archive#80 (took Dockerfile, Makefile and go.mod)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
vigith committed Sep 11, 2019
2 parents 7310ab6 + 5655e74 commit 370259f
Show file tree
Hide file tree
Showing 12,735 changed files with 544 additions and 4,845,363 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.12.9 AS build

FROM alpine:3.4
MAINTAINER Timothy St. Clair "[email protected]"
WORKDIR /src/
COPY . .

RUN CGO_ENABLED=0 go build -o /src/eventrouter

FROM alpine:3.9 as release

WORKDIR /app
RUN apk update --no-cache && apk add ca-certificates
ADD eventrouter /eventrouter
COPY --from=build /src/eventrouter .
USER nobody:nobody

CMD ["/bin/sh", "-c", "/eventrouter -v 3 -logtostderr"]
ENTRYPOINT [ "./eventrouter" ]
CMD ["-v", "3", "-logtostderr"]

Loading

0 comments on commit 370259f

Please sign in to comment.