Skip to content

Commit 5e98e5f

Browse files
committed
Move to Ruby 2.6.3 and Debian
This change updates Ruby and makes native packages such as nokogiri very simple to build and consume. Signed-off-by: Alex Ellis <[email protected]>
1 parent 759ab2f commit 5e98e5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

template/ruby-http/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM openfaas/of-watchdog:0.5.3 as watchdog
22

3-
FROM ruby:2.4-alpine3.8
3+
FROM ruby:2.6.3-slim-stretch
44

55
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
66
RUN chmod +x /usr/bin/fwatchdog
77

88
ARG ADDITIONAL_PACKAGE
9-
10-
RUN apk --no-cache add ${ADDITIONAL_PACKAGE}
9+
RUN apt-get update \
10+
&& apt-get install -qy --no-install-recommends ${ADDITIONAL_PACKAGE}
1111

1212
WORKDIR /home/app
1313

@@ -22,8 +22,9 @@ WORKDIR /home/app/function
2222

2323
RUN bundle install
2424

25-
RUN addgroup -S app \
26-
&& adduser app -S -G app
25+
# Create a non-root user
26+
RUN addgroup --system app \
27+
&& adduser --system --ingroup app app
2728

2829
RUN chown app:app -R /home/app
2930

@@ -40,4 +41,3 @@ ENV upstream_url="http://127.0.0.1:5000"
4041
ENV mode="http"
4142

4243
CMD ["fwatchdog"]
43-

0 commit comments

Comments
 (0)