Skip to content

Commit 1abca5b

Browse files
ismael_serranoisserrano
authored andcommitted
Add support for Amazon Linux 2
#17
1 parent e8aac89 commit 1abca5b

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ GO_DOCKER_RUN = docker run --rm -v $(shell pwd):/go/src/github.com/nginxinc/ngin
22
GOLANG_CONTAINER = golang:1.10
33
BUILD_IN_CONTAINER = 1
44

5-
all: amazon centos7 ubuntu-trusty ubuntu-xenial
5+
all: amazon centos7 ubuntu-trusty ubuntu-xenial amazon2
66

77
test:
88
ifeq ($(BUILD_IN_CONTAINER),1)
@@ -22,6 +22,10 @@ amazon: compile
2222
make -C build/package/builders/amazon/
2323
docker run --rm -v $(shell pwd)/build/package/rpm:/rpm -v $(shell pwd)/build_output:/build_output amazon-builder
2424

25+
amazon2: compile
26+
make -C build/package/builders/amazon2/
27+
docker run --rm -v $(shell pwd)/build/package/rpm:/rpm -v $(shell pwd)/build_output:/build_output amazon2-builder
28+
2529
centos7: compile
2630
make -C build/package/builders/centos7/
2731
docker run --rm -v $(shell pwd)/build/package/rpm:/rpm -v $(shell pwd)/build_output:/build_output centos7-builder

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ You can compile nginx-asg-sync and build a software package using the provided M
162162

163163
To build a software package, run: `$ make <os>`
164164
where `<os>` is the target OS. The following values are allowed:
165-
* `amazon` for Amazon Linux
165+
* `amazon` for Amazon Linux 1
166+
* `amazon2` for Amazon Linux 2
166167
* `centos7` for CentOS7/RHEL7
167168
* `ubuntu-trusty` for Ubuntu 14.04
168169
* `ubuntu-xenial` for Ubuntu 16.04

build/package/builders/amazon/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM amazonlinux:2018.03.0.20180424
1+
FROM amazonlinux:1
22

33
RUN yum install -y rpmdevtools
44
ADD build.sh /
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM amazonlinux:2
2+
3+
RUN yum install -y rpmdevtools
4+
ADD build.sh /
5+
6+
ENTRYPOINT ["/build.sh"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build:
2+
docker build -t amazon2-builder .
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
mkdir -p ~/rpmbuild
4+
cp -r rpm/* ~/rpmbuild/
5+
rpmbuild -bb ~/rpmbuild/SPECS/nginx-asg-sync.spec
6+
cp ~/rpmbuild/RPMS/x86_64/*.rpm /build_output

0 commit comments

Comments
 (0)