Skip to content

Commit ef33012

Browse files
committed
add MCROUTER_LISTEN_PORT as Dockerfile ENV
explicitly list and COPY files into the docker image fs
1 parent bbfb5ed commit ef33012

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

mcrouter/scripts/docker/Dockerfile.ubuntu-packaged

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ RUN set -xe \
88
apt-get update \
99
&& apt-get install -y $buildDeps
1010

11-
COPY ["container/ubuntu-packaged/", "/"]
11+
12+
COPY ["container/ubuntu-packaged/entrypoint.sh", \
13+
"/usr/local/bin/" \
14+
]
15+
16+
COPY ["container/ubuntu-packaged/10-mcrouter.list", \
17+
"/etc/apt/sources.list.d/" \
18+
]
19+
20+
COPY ["container/ubuntu-packaged/mcrouter.json", \
21+
"/etc/mcrouter/" \
22+
]
23+
24+
1225

1326
RUN wget -qO- \
1427
https://facebook.github.io/mcrouter/debrepo/xenial/PUBLIC.KEY \
@@ -20,4 +33,7 @@ RUN wget -qO- \
2033
&& apt-get purge -y --autoremove -o APT::AutoRemove::RecommendsImportant=false wget apt-transport-https \
2134
&& apt-get autoremove && apt-get autoclean && rm -rf /var/lib/apt-lists/*
2235

36+
37+
ENV MCROUTER_LISTEN_PORT 5000
38+
2339
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ function run_mcrouter() {
66
local CONFIG_PATH=$1
77
mcrouter \
88
--config file:${CONFIG_PATH} \
9-
-p "${MCROUTER_LISTEN_PORT:-5000}"
9+
-p "${MCROUTER_LISTEN_PORT:-5000}" \
10+
"$@"
1011
}
1112

1213

0 commit comments

Comments
 (0)