Skip to content

Commit 63ca28c

Browse files
authored
Update Dockerfile to work with the new changes in cli format (#171)
1 parent 8e74213 commit 63ca28c

File tree

6 files changed

+45
-47
lines changed

6 files changed

+45
-47
lines changed

Dockerfile

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,6 @@
1616
# Compile
1717
FROM rust:1.63-alpine AS compiler
1818

19-
RUN apk add -q --update-cache --no-cache build-base openssl-dev
20-
21-
# Create appuser
22-
ENV USER=parseable
23-
ENV UID=10001
24-
25-
RUN adduser \
26-
--disabled-password \
27-
--gecos "" \
28-
--home "/nonexistent" \
29-
--shell "/sbin/nologin" \
30-
--no-create-home \
31-
--uid "${UID}" \
32-
"${USER}"
33-
3419
WORKDIR /parseable
3520

3621
COPY . .
@@ -43,24 +28,31 @@ RUN set -eux; \
4328
cargo build --release
4429

4530
# Run
46-
FROM alpine:3.14
31+
FROM alpine:3.16
4732

4833
RUN apk update --quiet \
49-
&& apk add -q --no-cache libgcc curl
34+
&& apk add -q --no-cache tini
5035

51-
# add parseable to the `/bin` so you can run it from anywhere and it's easy
52-
# to find.
53-
COPY --from=compiler /etc/passwd /etc/passwd
54-
COPY --from=compiler /etc/group /etc/group
36+
# Create appuser
37+
ENV USER=parseable
38+
ENV UID=10001
39+
40+
RUN adduser \
41+
--disabled-password \
42+
--gecos "" \
43+
--home "/nonexistent" \
44+
--shell "/sbin/nologin" \
45+
--no-create-home \
46+
--uid "${UID}" \
47+
"${USER}"
5548

56-
# This directory should hold all the data related to parseable so we're going
57-
# to move our PWD in there.
5849
WORKDIR /parseable
5950

6051
COPY --from=compiler /parseable/target/release/parseable /bin/parseable
6152

6253
USER parseable:parseable
6354

6455
EXPOSE 8000/tcp
56+
ENTRYPOINT ["tini", "--"]
6557

66-
CMD ["/bin/parseable"]
58+
CMD /bin/parseable

Dockerfile.release

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
# You should have received a copy of the GNU Affero General Public License
1414
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16-
FROM alpine:3.14
16+
FROM alpine:3.16
17+
18+
RUN apk update --quiet && \
19+
apk add -q --no-cache tini
1720

18-
RUN apk update --quiet \
19-
&& apk add -q --no-cache libgcc curl
20-
2121
# Create appuser
2222
ENV USER=parseable
2323
ENV UID=10001
@@ -43,4 +43,5 @@ USER parseable:parseable
4343

4444
EXPOSE 8000/tcp
4545

46-
CMD ["/bin/parseable"]
46+
ENTRYPOINT ["tini", "--"]
47+
CMD /bin/parseable

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ docker run \
6565
-p 8000:8000 \
6666
--env-file parseable-env \
6767
-v /tmp/data:/data \
68-
parseable/parseable:latest
68+
parseable/parseable:latest \
69+
parseable server
6970
```
7071

7172
### Kubernetes

helm/parseable/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: parseable
33
description: Helm chart for Parseable Server
44
type: application
5-
version: 0.0.2
6-
AppVersion: "v0.0.2"
5+
version: 0.0.5
6+
AppVersion: "v0.0.5"

helm/parseable/templates/deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ spec:
3131
{{- toYaml .Values.parseable.securityContext | nindent 12 }}
3232
image: "{{ .Values.parseable.image.repository }}:{{ .Values.parseable.image.tag | default .Chart.AppVersion }}"
3333
imagePullPolicy: {{ .Values.parseable.image.pullPolicy }}
34+
{{- if .Values.parseable.demo }}
35+
args: ["parseable", "server", "--demo"]
36+
{{- else }}
37+
args: ["parseable", "server"]
38+
{{- end }}
3439
env:
3540
{{- range $key, $value := .Values.parseable.env }}
3641
- name: {{ $key }}

helm/parseable/values.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,24 @@ parseable:
22
replicaCount: 1
33
image:
44
repository: parseable/parseable
5-
tag: v0.0.2
5+
tag: v0.0.5
66
pullPolicy: IfNotPresent
77
demo: true
88
env:
9-
P_ADDR: "0.0.0.0:8000"
10-
P_TLS_CERT_PATH: ""
11-
P_LOCAL_STORAGE: "data"
12-
P_STORAGE_UPLOAD_INTERVAL: "60"
139
RUST_LOG: "parseable=info"
14-
# By default parseable uses demo environment.
15-
# Please change this before running in production.
16-
P_S3_URL: ""
17-
P_S3_ACCESS_KEY: ""
18-
P_S3_SECRET_KEY: ""
19-
P_S3_REGION: ""
20-
P_S3_BUCKET: ""
21-
P_LOCAL_STORAGE: ""
22-
P_USERNAME: ""
23-
P_PASSWORD: ""
10+
# P_ADDR: "0.0.0.0:8000"
11+
# P_TLS_CERT_PATH: ""
12+
# P_TLS_KEY_PATH: ""
13+
# P_LOCAL_STORAGE: "data"
14+
# P_STORAGE_UPLOAD_INTERVAL: "60"
15+
# P_S3_URL: ""
16+
# P_S3_ACCESS_KEY: ""
17+
# P_S3_SECRET_KEY: ""
18+
# P_S3_REGION: ""
19+
# P_S3_BUCKET: ""
20+
# P_LOCAL_STORAGE: ""
21+
# P_USERNAME: ""
22+
# P_PASSWORD: ""
2423
nameOverride: ""
2524
fullnameOverride: ""
2625
serviceAccount:

0 commit comments

Comments
 (0)