Skip to content

Commit

Permalink
Split Dockerfiles into scratch, alpine, and debian versions.
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Moyer <moyer@heptio.com>
  • Loading branch information
mattmoyer committed Jan 25, 2018
1 parent 59cf5c3 commit 1443fd0
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,38 @@ builds:

dockers:
- image: gcr.io/heptio-images/authenticator
binary: heptio-authenticator-aws
dockerfile: Dockerfile.scratch
tag_templates:
- "{{ .Tag }}-scratch"
- "{{ .Tag }}"
latest: false
- image: gcr.io/heptio-images/authenticator
binary: heptio-authenticator-aws
dockerfile: Dockerfile.alpine-3.6
tag_templates:
- "{{ .Tag }}-alpine-3.6"
latest: false
- image: gcr.io/heptio-images/authenticator
binary: heptio-authenticator-aws
dockerfile: Dockerfile.alpine-3.7
tag_templates:
- "{{ .Tag }}-alpine-3.7"
- "{{ .Tag }}-alpine"
latest: false
- image: gcr.io/heptio-images/authenticator
binary: heptio-authenticator-aws
dockerfile: Dockerfile.debian-jessie
tag_templates:
- "{{ .Tag }}-debian-jessie"
latest: false
- image: gcr.io/heptio-images/authenticator
binary: heptio-authenticator-aws
dockerfile: Dockerfile.debian-stretch
tag_templates:
- "{{ .Tag }}-debian-stretch"
- "{{ .Tag }}-debian"
latest: false

snapshot:
name_template: "git-{{.Commit}}"
Expand All @@ -27,4 +59,4 @@ release:
name: authenticator
draft: true
prerelease: true
name_template: "v{{.Version}}"
name_template: "v{{.Version}}"
20 changes: 20 additions & 0 deletions Dockerfile.alpine-3.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2017 by the contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM alpine:3.6
RUN adduser -D -u 10000 heptio-authenticator-aws
RUN apk add --update ca-certificates
COPY heptio-authenticator-aws /
USER heptio-authenticator-aws
ENTRYPOINT ["/heptio-authenticator-aws"]
20 changes: 20 additions & 0 deletions Dockerfile.alpine-3.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2017 by the contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM alpine:3.7
RUN adduser -D -u 10000 heptio-authenticator-aws
RUN apk add --update ca-certificates
COPY heptio-authenticator-aws /
USER heptio-authenticator-aws
ENTRYPOINT ["/heptio-authenticator-aws"]
28 changes: 28 additions & 0 deletions Dockerfile.debian-jessie
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2017 by the contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:jessie
RUN adduser \
--system \
--no-create-home \
--uid 10000 \
--disabled-password \
--disabled-login \
heptio-authenticator-aws && \
apt-get update && \
apt-get install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY heptio-authenticator-aws /
USER heptio-authenticator-aws
ENTRYPOINT ["/heptio-authenticator-aws"]
28 changes: 28 additions & 0 deletions Dockerfile.debian-stretch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2017 by the contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:stretch
RUN adduser \
--system \
--no-create-home \
--uid 10000 \
--disabled-password \
--disabled-login \
heptio-authenticator-aws && \
apt-get update && \
apt-get install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY heptio-authenticator-aws /
USER heptio-authenticator-aws
ENTRYPOINT ["/heptio-authenticator-aws"]
File renamed without changes.

0 comments on commit 1443fd0

Please sign in to comment.