File tree Expand file tree Collapse file tree 1 file changed +6
-37
lines changed Expand file tree Collapse file tree 1 file changed +6
-37
lines changed Original file line number Diff line number Diff line change 13
13
# You should have received a copy of the GNU Affero General Public License
14
14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
16
- # Compile
17
- FROM rust:1.67-alpine AS compiler
16
+ FROM rust:1.67.0 as builder
18
17
19
18
WORKDIR /parseable
20
19
21
- RUN apk add --no-cache musl-dev
22
-
23
20
COPY . .
24
21
25
- RUN set -eux; \
26
- apkArch="$(apk --print-arch)" ; \
27
- if [ "$apkArch" = "aarch64" ]; then \
28
- export JEMALLOC_SYS_WITH_LG_PAGE=16; \
29
- fi && \
30
- cargo build --release
31
-
32
- # Run
33
- FROM alpine:3.16
34
-
35
- RUN apk update --quiet \
36
- && apk add -q --no-cache tini
37
-
38
- # Create appuser
39
- ENV USER=parseable
40
- ENV UID=10001
41
-
42
- RUN adduser \
43
- --disabled-password \
44
- --gecos "" \
45
- --home "/nonexistent" \
46
- --shell "/sbin/nologin" \
47
- --no-create-home \
48
- --uid "${UID}" \
49
- "${USER}"
22
+ RUN cargo build --release
23
+
24
+ FROM gcr.io/distroless/cc:latest
50
25
51
26
WORKDIR /parseable
52
27
53
- COPY --from=compiler /parseable/target/release/parseable /bin/parseable
54
- RUN chown -R parseable /parseable/
55
-
56
- USER parseable:parseable
57
-
58
- EXPOSE 8000/tcp
28
+ COPY --from=builder /parseable/target/release/parseable /usr/local/bin/parseable
59
29
60
- ENTRYPOINT ["tini" , "--" ]
61
- CMD /bin/parseable
30
+ CMD ["/usr/local/bin/parseable" ]
You can’t perform that action at this time.
0 commit comments