-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathDockerfile.std
More file actions
36 lines (26 loc) · 1011 Bytes
/
Dockerfile.std
File metadata and controls
36 lines (26 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Generated by: gromit policy
FROM debian:trixie-slim
ARG TARGETARCH
ARG BUILD_PACKAGE_NAME
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get dist-upgrade -y ca-certificates
# Remove some things to decrease CVE surface
RUN dpkg --purge --force-remove-essential curl ncurses-base || true
RUN rm -fv /usr/bin/passwd /usr/sbin/adduser || true
# Comment this to test in dev
COPY dist/${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb /
RUN dpkg -i /${BUILD_PACKAGE_NAME}_*_${TARGETARCH}.deb && find / -maxdepth 1 -name "*.deb" -delete
# Clean up caches, unwanted .a and .o files
RUN rm -rf /root/.cache \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /usr/include/* /var/cache/apt/archives /var/lib/apt /var/lib/cache /var/log/* \
&& find /usr/lib -type f -name '*.a' -o -name '*.o' -delete
ARG PORTS
EXPOSE $PORTS
WORKDIR /opt/tyk-gateway/
# Uncomment this to test in dev
# COPY tyk .
ENTRYPOINT ["/opt/tyk-gateway/tyk" ]
CMD [ "--conf=/opt/tyk-gateway/tyk.conf" ]