Skip to content

Commit

Permalink
Fix dockerfile. Again.
Browse files Browse the repository at this point in the history
Docker builds were broken because the nim image does not add the Nimble
bin directory to PATH. This fix solves it by copying the nasher binary
to /usr/local/bin. As a side-effect, this fixes #42, allowing you to
pass your user/group to the docker command and own the files docker
generates.
  • Loading branch information
squattingmonk committed Nov 19, 2020
1 parent 08049b7 commit ddb28b0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
ARG nasher_version=0.13.0
ARG nim_version=1.4.0
# nwnsc compiler
FROM nwneetools/nwnsc:latest as nwnsc
# nim image
FROM nimlang/nim:${nim_version}-alpine
FROM nimlang/nim:alpine as nasher
COPY --from=nwnsc usr/local/bin/nwnsc usr/local/bin/nwnsc
COPY --from=nwnsc /nwn /nwn
RUN nimble install nasher@#${nasher_version} -y \
&& nasher config --nssFlags:"-n /nwn/data -o" \
RUN apk add --no-cache bash
ARG NASHER_VERSION="0.13.0"
ENV PATH="/root/.nimble/bin:$PATH"
RUN nimble install nasher@#${NASHER_VERSION} -y
RUN nasher config --nssFlags:"-n /nwn/data -o" \
&& nasher config --installDir:"/nasher/install" \
&& nasher config --userName:"nasher"
WORKDIR /nasher
RUN bash -c 'mkdir -pv /nasher/install/{modules,erf,hak,tlk}'
RUN bash -c "mkdir -pv /nasher/install/{erf,hak,modules,tlk}"
ENTRYPOINT [ "nasher" ]
CMD [ "list --quiet" ]
CMD [ "--help" ]

0 comments on commit ddb28b0

Please sign in to comment.