I am trying to dockerise my elm application (code is open source), here is my Dockerfile
:
# set base image as alpine
FROM alpine:3.11.2 AS builder
# download the elm compiler and extract it to /user/local/bin/elm
RUN wget -O - 'https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz' \
| gunzip -c >/usr/local/bin/elm
# make the elm compiler executable
RUN chmod +x /usr/local/bin/elm
# update remote repositories
RUN apk update
# install nodejs
RUN apk add --update nodejs npm
# install uglifyjs
RUN npm install uglify-js --global
# set the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD
# instructions that follows the WORKDIR instruction.
WORKDIR /app
# remember, our current working directory within the container is /app
# we now copy everything (except stuff listed in .dockerignore)
# from local machine to /app (in the container).
COPY . .
# build elm production code
RUN elm make src/app/Main.elm --optimize --output=elm.js
When I run docker build . --no-cache
I get the following error:
ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = , addrCanonName = }, host name: Just "package.elm-lang.org", service name: Just "443"): does not exist (Try again)
Here is what it looks like:
I don't have any connection issues, plus if I did have any, then you'd think the install of nodejs and uglifyjs would also fail, correct? Yet those install without any problems.
I'm confused and not really sure what I need to do.