mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
2b377a7916
- Should address #375 (building a win app from linux) under Docker, thanks @dipenpatel235 for the suggestion to use `wine32` at https://github.com/jiahaog/nativefier/issues/375#issuecomment-304247033 - Regarding #461, Docker build seems fine but it was already fine for some time, not sure what happened. Also clean up a bit the Dockerfile using suggestions from [hadolint](https://github.com/lukasmartinelli/hadolint/).
35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
FROM node:8-stretch
|
|
LABEL description="Debian image to build nativefier apps"
|
|
|
|
# Get wine32, not 64, to work around binary incompatibility with rcedit.
|
|
# https://github.com/jiahaog/nativefier/issues/375#issuecomment-304247033
|
|
# Forced us to use Debian rather than Alpine, which doesn't do multiarch.
|
|
RUN dpkg --add-architecture i386
|
|
|
|
# Install dependencies
|
|
RUN apt-get update \
|
|
&& apt-get --yes install wine32 imagemagick \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Add sources
|
|
COPY . /nativefier
|
|
|
|
# Build nativefier and link globally
|
|
WORKDIR /nativefier/app
|
|
RUN npm install
|
|
WORKDIR /nativefier
|
|
RUN npm install && npm run build && npm link
|
|
|
|
# Use 1000 as default user not root
|
|
USER 1000
|
|
|
|
# Run a {lin,mac,win} build: 1. to check installation was sucessful,
|
|
# 2. to cache electron distributables and avoid downloads at runtime.
|
|
RUN nativefier https://github.com/jiahaog/nativefier /tmp/nativefier \
|
|
&& nativefier -p osx https://github.com/jiahaog/nativefier /tmp/nativefier \
|
|
&& nativefier -p windows https://github.com/jiahaog/nativefier /tmp/nativefier \
|
|
&& rm -rf /tmp/nativefier
|
|
|
|
ENTRYPOINT ["nativefier"]
|
|
CMD ["--help"]
|