This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from dgonyeo/examples
examples: Added example build scripts for acserver and nginx
- Loading branch information
Showing
2 changed files
with
37 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,21 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
echo "Building acserver..." | ||
CGO_ENABLED=0 GOOS=linux go build -o acserver -a -tags netgo -ldflags '-w' github.com/appc/acserver | ||
|
||
acbuild --debug begin | ||
|
||
trap "{ export EXT=$?; acbuild --debug end && exit $EXT; }" EXIT | ||
|
||
acbuild --debug set-name example.com/acserver | ||
acbuild --debug copy acserver /bin/acserver | ||
acbuild --debug copy $GOPATH/src/github.com/appc/acserver/templates /templates | ||
acbuild --debug set-exec /bin/acserver | ||
acbuild --debug port add http tcp 3001 | ||
acbuild --debug mount add acis /acis | ||
acbuild --debug label add arch amd64 | ||
acbuild --debug label add os linux | ||
acbuild --debug write --overwrite acserver-latest-linux-amd64.aci | ||
|
||
rm acserver |
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 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
acbuild --debug begin quay.io/listhub/alpine | ||
|
||
trap "{ export EXT=$?; acbuild --debug end && exit $EXT; }" EXIT | ||
|
||
acbuild --debug set-name example.com/nginx | ||
acbuild --debug run apk update | ||
acbuild --debug run apk add nginx | ||
acbuild --debug set-exec -- /usr/sbin/nginx -g "daemon off;" | ||
acbuild --debug port add http tcp 80 | ||
acbuild --debug mount add html /usr/share/nginx/html | ||
acbuild --debug label add arch amd64 | ||
acbuild --debug label add os linux | ||
acbuild --debug write --overwrite nginx-latest-linux-amd64.aci |