Skip to content

Commit

Permalink
Merge pull request #16 from bottlerocket-os/setup
Browse files Browse the repository at this point in the history
initial project setup
  • Loading branch information
webern authored Jan 22, 2021
2 parents 5fcf3aa + ed61209 commit 78d96ba
Show file tree
Hide file tree
Showing 12 changed files with 3,387 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
BOTTLEROCKET_SDK_VERSION = 0.15.0
BOTTLEROCKET_SDK_SITE = cache.bottlerocket.aws
LOCAL_ARCH = $(shell uname -m)
TARGET_ARCH = x86_64

# the docker image that will be used to compile rust code
BUILDER_IMAGE = bottlerocket/sdk-${TARGET_ARCH}:v${BOTTLEROCKET_SDK_VERSION}-${LOCAL_ARCH}

# the target triple that will be passed to the cargo build command with as --target
RUST_TARGET = ${TARGET_ARCH}-bottlerocket-linux-musl

.PHONY: image # creates a docker image with the updater binary
image: fetch-sdk
DOCKER_BUILDKIT=1 \
docker build \
-t bottlerocket-ecs-updater:latest \
--build-arg BUILDER_IMAGE=${BUILDER_IMAGE} \
--build-arg RUST_TARGET=${RUST_TARGET} \
"${PWD}/updater"

.PHONY: fetch-sdk
fetch-sdk: # fetches and loads the image we use to build the updater docker image
scripts/load-bottlerocket-sdk.sh --site ${BOTTLEROCKET_SDK_SITE} --image ${BUILDER_IMAGE}
Loading

0 comments on commit 78d96ba

Please sign in to comment.