Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
964be369
Commit
964be369
authored
Sep 25, 2014
by
Johan Euphrosine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/guestbook-go: build from source and remove bin/docker dep
parent
a981ae54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
Dockerfile
examples/guestbook-go/_src/Dockerfile
+6
-6
build.sh
examples/guestbook-go/_src/script/build.sh
+1
-12
No files found.
examples/guestbook-go/_src/Dockerfile
View file @
964be369
FROM
google/golang:latest
FROM
google/golang:latest
RUN
mkdir
-p
/gopath/src/github.com/GoogleCloudPlatform/
&&
cd
/gopath/src/github.com/GoogleCloudPlatform/
&&
\
ADD
. /gopath/src/github.com/GoogleCloudPlatform/kubernetes/examples/guestbook-go/_src
git clone http://github.com/GoogleCloudPlatform/kubernetes
&&
\
cd
/gopath/src/github.com/GoogleCloudPlatform/kubernetes/examples/guestbook-go/_src/
&&
\
go get
&&
go build
-o
../bin/guestbook
&&
\
cp
./guestbook/Dockerfile /gopath/src/github.com/GoogleCloudPlatform/kubernetes/examples/guestbook-go/
CMD
docker build --rm --force-rm -t kubernetes/guestbook /gopath/src/github.com/GoogleCloudPlatform/kubernetes/examples/guestbook-go/
WORKDIR
/gopath/src/github.com/GoogleCloudPlatform/kubernetes/examples/guestbook-go/
RUN
cd
_src/
&&
go get
&&
go build
-o
../bin/guestbook
RUN
cp
_src/guestbook/Dockerfile .
CMD
tar cvzf - .
examples/guestbook-go/_src/script/build.sh
View file @
964be369
...
@@ -20,16 +20,5 @@ set -o errexit
...
@@ -20,16 +20,5 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
if
[[
"
${
DOCKER_BIN
+set
}
"
==
"set"
]]
;
then
echo
"Using DOCKER_BIN=
\"
${
DOCKER_BIN
}
\"
from the environment."
elif
DOCKER_BIN
=
$(
which docker
)
;
then
echo
"Setting DOCKER_BIN=
\"
${
DOCKER_BIN
}
\"
from host machine."
else
echo
"Could not find a working docker binary and none passed in DOCKER_BIN."
>
&2
exit
1
fi
docker build
--rm
--force-rm
-t
kubernetes/guestbook-build
.
docker build
--rm
--force-rm
-t
kubernetes/guestbook-build
.
docker run
--rm
-v
"
${
DOCKER_BIN
}
:/usr/local/bin/docker"
\
docker run
--rm
kubernetes/guestbook-build | docker build
-t
kubernetes/guestbook -
-v
"/var/run/docker.sock:/var/run/docker.sock"
\
-ti
--name
guestbook-build kubernetes/guestbook-build
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment