Skip to content

Commit ac7df3c

Browse files
authored
Merge pull request #3 from in4it/feat/fix-bin-alpine
update go + use CGO_ENABLED=0 to build static Go binaries, needed by Alpine images
2 parents 8157562 + ed03b13 commit ac7df3c

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file is used to ignore local build artifacts and binaries.
2+
bin/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ aws-env - Secure way to handle environment variables in Docker
88
1. Populate environment variables while starting application inside the docker container (default)
99
2. Generate .env file (--format=dotenv)
1010

11+
## How to build it
12+
```bash
13+
make build
14+
```
15+
1116
## Usage
1217

1318
1. Add parameters to [Parameter Store](https://console.aws.amazon.com/ec2/v2/home#Parameters:) using hierarchy in names:

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ mkdir $BUILD_DIR
77

88
for GOOS in linux windows; do
99
for GOARCH in 386 amd64; do
10-
GOOS=$GOOS GOARCH=$GOARCH go build -v -o $BUILD_DIR/$NAME-$GOOS-$GOARCH
10+
CGO_ENABLED=0 GOOS=$GOOS GOARCH=$GOARCH go build -v -o $BUILD_DIR/$NAME-$GOOS-$GOARCH
1111
done
1212
done

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/in4it/aws-env
22

3-
go 1.24.2
3+
go 1.24.5
44

55
require (
66
github.com/aws/aws-sdk-go v1.44.105 // indirect

0 commit comments

Comments
 (0)