2020-09-08 16:29:34 +00:00
|
|
|
# Copyright 2020 VMware, Inc.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
# Use a runtime image based on Debian slim
|
2020-11-03 00:17:15 +00:00
|
|
|
FROM debian:10.6-slim
|
2020-09-08 16:29:34 +00:00
|
|
|
|
2020-11-11 23:10:06 +00:00
|
|
|
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2020-09-08 16:29:34 +00:00
|
|
|
# Copy the binary which was built outside the container.
|
2020-10-09 21:25:34 +00:00
|
|
|
COPY build/pinniped-supervisor /usr/local/bin/pinniped-supervisor
|
2020-09-08 16:29:34 +00:00
|
|
|
|
|
|
|
# Document the port
|
2020-11-02 21:32:50 +00:00
|
|
|
EXPOSE 8080 8443
|
|
|
|
|
|
|
|
# Run as non-root for security posture
|
2020-11-10 17:27:44 +00:00
|
|
|
# Commented out because it breaks the live-reload feature of Tilt. See https://github.com/tilt-dev/tilt/issues/2300
|
|
|
|
# Be aware that this creates a significant difference between running with Tilt and running otherwise.
|
|
|
|
#USER 1001:1001
|
2020-09-08 16:29:34 +00:00
|
|
|
|
|
|
|
# Set the entrypoint
|
2020-10-09 21:25:34 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/pinniped-supervisor"]
|