Code Monkey home page Code Monkey logo

baseimage's Introduction

baseimage

Deploy to github hub

Docker images for golang and nodeJS projects.

Images

Alpine

Minimalistic alpine image for docker.
Based on alpine:3.8.

Using tzdata for setting local time (by default: Etc/UTC, +0).
For properly starting and killing process using tini.

Main process will be started as non root user with UID 1001.

If for some reason you want to run sh, just run in image command: bash.

run docker --rm -it exelban/baseimage:alpine-latest bash

As entrypoint in image using init.sh script. But if you need own configuration just upload your own init.sh to /svr.

COPY ./init.sh /srv/

And this script will be entrypoint in image.

Size

Compressed: 3MB
Uncompressed: 5.57MB + application size

Golang

Image based on golang:1.12-alpine.
Added tzdata git packages for time and fetching projects from git.

Installed tools:

  • golangci-lint

Size

Compressed: 180MB
Uncompressed: 379MB

NodeJS

Image based on node:10. Added tzdata git packages for time.

Size

Compressed: 330MB
Uncompressed: 674MB

Usage

Golang

FROM exelban/baseimage:golang-latest as build

WORKDIR /go/src/example/
ADD . /go/src/example/

RUN dep ensure

RUN echo "Started compiling..."
RUN go build -o ./bin/main
RUN echo "Compiling compete. Output: ./bin/main"


FROM exelban/baseimage:alpine-latest

COPY --from=build /go/src/example/bin /

ENTRYPOINT ./main

NodeJS

FROM exelban/baseimage:node-latest as build

WORKDIR /usr/src/app

COPY . .

RUN npm install --silent

CMD [ "npm", "start" ]

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.