Skip to content

Commit

Permalink
fix/dockerfile: remove VOLUME definition - fixes #9 (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: BugFest <bugfest.dev@pm.me>
  • Loading branch information
bugfest committed Nov 18, 2023
1 parent 47c2fee commit 6a9b089
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Build multiarch image - tag
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'

- '[0-9]+-[0-9]+-[0-9]+-[0-9]+'
- '[0-9]+-[0-9]+-[0-9]+-[0-9]+-r[0-9]+'
- '[0-9]+-[0-9]+-[0-9]+-[0-9]+-rc[0-9]+'
workflow_dispatch:

jobs:
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ COPY --from=tor-builder /tor/src/config/geoip6 /usr/local/share/tor/.
# install transports
COPY --from=obfs-builder /out/obfs4proxy /usr/local/bin/.

# create service dir (we don't define VOLUME because https://github.com/docker-library/mysql/issues/255
# and other issues when running as non-root user)
RUN mkdir -p /run/tor/service && chown -R 1001 /run/tor

# change to non root
USER 1001

# create service dir
VOLUME /run/tor/service

ENTRYPOINT ["/usr/local/bin/tor"]
7 changes: 4 additions & 3 deletions Dockerfile.quick
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ RUN ln -s /usr/bin/tor /usr/local/bin/tor
# install transports
COPY --from=obfs-builder /out/obfs4proxy /usr/local/bin/.

# create service dir (we don't define VOLUME because https://github.com/docker-library/mysql/issues/255
# and other issues when running as non-root user)
RUN mkdir -p /run/tor/service && chown -R 1001 /run/tor

# change to non root
USER 1001

# create service dir
VOLUME /run/tor/service

ENTRYPOINT ["/usr/local/bin/tor"]

0 comments on commit 6a9b089

Please sign in to comment.