Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit ae624a6

Browse files
committed
Add build scripts and dep mgmt
1 parent 0353a97 commit ae624a6

File tree

7 files changed

+546
-2
lines changed

7 files changed

+546
-2
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.git
2+
bin
3+
output
4+
img2lambda
5+
vendor
6+
AUTHORS.md
7+
CONTRIBUTING.md
8+
LICENSE
9+
NOTICE
10+
README.md
11+
Dockerfile
12+
Makefile

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
# Output of the go coverage tool, specifically when used with LiteIDE
1212
*.out
1313

14+
bin/
1415
vendor/
15-
16-
output/
16+
output/

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM golang:1.11 AS builder
2+
3+
# Install dep
4+
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
5+
6+
WORKDIR $GOPATH/src/github.com/awslabs/img2lambda
7+
8+
# Ensure deps, optimized for build caching
9+
COPY Gopkg.toml Gopkg.lock ./
10+
RUN dep ensure --vendor-only
11+
12+
# Copy and build the code
13+
COPY . ./
14+
RUN go build -o /bin/img2lambda -tags="containers_image_ostree_stub exclude_graphdriver_devicemapper exclude_graphdriver_overlay exclude_graphdriver_btrfs containers_image_openpgp" .
15+
16+
FROM busybox:glibc
17+
COPY --from=builder /bin/img2lambda /bin/img2lambda
18+
RUN /bin/img2lambda --help
19+
CMD [ "/bin/img2lambda" ]

0 commit comments

Comments
 (0)