Skip to content

Commit ec38ac9

Browse files
committed
Add alpine build inside docker
1 parent ed9b86a commit ec38ac9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ _testmain.go
2424
*.prof
2525
.idea/
2626
dist/
27+
.vscode/

hack/docker/setup.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,19 @@ build_binary() {
3838

3939
build_docker() {
4040
pushd $GOPATH/src/github.com/appscode/osm/hack/docker
41-
cp $DIST/osm/osm-linux-amd64 osm
41+
cp $DIST/osm/osm-alpine-amd64 osm
4242
chmod 755 osm
4343

4444
cat >Dockerfile <<EOL
4545
FROM alpine
4646
4747
RUN set -x \
48-
&& apk update \
49-
&& apk add ca-certificates \
50-
&& rm -rf /var/cache/apk/*
48+
&& apk add --update --no-cache ca-certificates
5149
52-
COPY osm /osm
50+
COPY osm /usr/bin/osm
5351
5452
USER nobody:nobody
55-
ENTRYPOINT ["/osm"]
53+
ENTRYPOINT ["osm"]
5654
EOL
5755
local cmd="docker build -t appscode/$IMG:$TAG ."
5856
echo $cmd; $cmd

hack/make.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def check_antipackage():
4949
'release': True,
5050
'go_version': True,
5151
'distro': {
52+
'alpine': ['amd64'],
5253
'darwin': ['386', 'amd64'],
5354
'linux': ['arm', '386', 'amd64'],
5455
'windows': ['386', 'amd64']

0 commit comments

Comments
 (0)