-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(cherry picked from commit f2c76ad6214350c6ca93ea74ed6765c48613e32d)
- Loading branch information
1 parent
6bacebf
commit b2af4bd
Showing
3 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM golang:1.15 as builder | ||
ENV APP_USER app | ||
ENV APP_HOME /go/src/openshift-app-sample | ||
RUN groupadd $APP_USER && useradd -m -g $APP_USER -l $APP_USER | ||
RUN mkdir -p $APP_HOME && chown -R $APP_USER:$APP_USER $APP_HOME | ||
WORKDIR $APP_HOME | ||
USER $APP_USER | ||
COPY src/ . | ||
RUN go build -o openshift-app-sample | ||
|
||
FROM golang:1.15 | ||
ENV APP_USER app | ||
ENV APP_HOME /go/src/openshift-app-sample | ||
RUN groupadd $APP_USER && useradd -m -g $APP_USER -l $APP_USER | ||
RUN mkdir -p $APP_HOME | ||
WORKDIR $APP_HOME | ||
COPY --chown=0:0 --from=builder $APP_HOME/openshift-app-sample $APP_HOME | ||
USER $APP_USER | ||
CMD ["./openshift-app-sample"] |
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,16 @@ | ||
// Copyright (c) IBM Corporation 2021. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0, which is available at | ||
// http://www.eclipse.org/legal/epl-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 | ||
|
||
// Package main provides the entry point for a executable application. | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("Hello World!!!") | ||
} |
Binary file not shown.