...
1# The `test-shadow` image gets built by `build-aux/check.mk` for use
2# by `python/tests/ingegration/manifests.py`.
3
4# Copyright 2018 Datawire. All rights reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License
17
18FROM ubuntu:23.04
19
20LABEL PROJECT_REPO_URL = "git@github.com:datawire/ambassador.git" \
21 PROJECT_REPO_BROWSER_URL = "https://github.com/datawire/ambassador" \
22 DESCRIPTION = "Ambassador REST Service" \
23 VENDOR = "Datawire" \
24 VENDOR_URL = "https://datawire.io/"
25
26# This Dockerfile is set up to install all the application-specific stuff into
27# /application.
28#
29# NOTE: If you don't know what you're doing, it's probably a mistake to
30# blindly hack up this file.
31
32# We need curl, pip, and dnsutils (for nslookup) -- and dnsutils mustn't
33# be trying to prompt for time zones or the like.
34RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -q install -y \
35 curl \
36 python3-pip \
37 python3-venv \
38 dnsutils
39
40# Set WORKDIR to /application which is the root of all our apps.
41WORKDIR /application
42
43# Create the Python virtual environment
44RUN python3 -m venv /opt/venv
45
46# COPY only requirements.txt to avoid screwing up Docker caching and
47# causing a full reinstall of all dependencies when dependencies are
48# not changed.
49COPY requirements.txt .
50# Install application dependencies
51RUN /opt/venv/bin/pip3 install -r requirements.txt
52
53# COPY the app code and configuration into place.
54COPY shadow.py shadowsvc.crt shadowsvc.key entrypoint.sh ./
55
56# perform any final configuration steps.
57ARG VERSION="0.0.2"
58ENV VERSION=${VERSION}
59ARG TLS=""
60ENV TLS=${TLS}
61ENTRYPOINT ./entrypoint.sh ${VERSION} ${TLS}
View as plain text