Skip to content
Snippets Groups Projects
Unverified Commit 0f99a56c authored by jonastheis's avatar jonastheis
Browse files

Fix permission denied in container if run without mounting a `rw` volume...

Fix permission denied in container if run without mounting a `rw` volume making it possible to run as throw-away container.
Remove `VOLUME` from Dockerfile as this only pollutes host system with anonymous volumes.
parent 470d1481
No related branches found
No related tags found
No related merge requests found
...@@ -34,8 +34,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ ...@@ -34,8 +34,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
# user:group is nonroot:nonroot, uid:gid = 65532:65532 # user:group is nonroot:nonroot, uid:gid = 65532:65532
FROM gcr.io/distroless/static@sha256:23aa732bba4c8618c0d97c26a72a32997363d591807b0d4c31b0bbc8a774bddf FROM gcr.io/distroless/static@sha256:23aa732bba4c8618c0d97c26a72a32997363d591807b0d4c31b0bbc8a774bddf
VOLUME /mainnetdb
EXPOSE 14666/tcp EXPOSE 14666/tcp
EXPOSE 14626/udp EXPOSE 14626/udp
...@@ -44,4 +42,4 @@ COPY --from=build /go/bin/goshimmer /run/goshimmer ...@@ -44,4 +42,4 @@ COPY --from=build /go/bin/goshimmer /run/goshimmer
# Copy the default config # Copy the default config
COPY config.default.json /config.json COPY config.default.json /config.json
ENTRYPOINT ["/run/goshimmer", "--config-dir=/", "--database.directory=/mainnetdb"] ENTRYPOINT ["/run/goshimmer", "--config-dir=/", "--database.directory=/tmp/mainnetdb"]
...@@ -14,7 +14,7 @@ services: ...@@ -14,7 +14,7 @@ services:
# make sure to give read/write access to the folder ./mainnetdb (e.g., chmod -R 777 ./mainnetdb) # make sure to give read/write access to the folder ./mainnetdb (e.g., chmod -R 777 ./mainnetdb)
# optionally, you can mount a config.json into the container # optionally, you can mount a config.json into the container
volumes: volumes:
- ./mainnetdb/:/mainnetdb/:rw - ./mainnetdb/:/tmp/mainnetdb/:rw
#- ./config.json:/config.json:ro #- ./config.json:/config.json:ro
# Expose ports: # Expose ports:
# gossip: - "14666:14666/tcp" # gossip: - "14666:14666/tcp"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment