Skip to content

Instantly share code, notes, and snippets.

@ernestboey
ernestboey / Dockerfile
Last active July 3, 2023 20:21
Create Docker image with Alpine 3.9 + Golang 1.12.9 + Node.js 10.16.3
FROM node:10.16.3-alpine
# Golang From: https://github.com/docker-library/golang/blob/master/1.12/alpine3.10/Dockerfile
RUN apk add --no-cache \
ca-certificates
# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf