Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yvess committed Apr 17, 2020
0 parents commit 92cc7c3
Show file tree
Hide file tree
Showing 7 changed files with 10,475 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 taywa & contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NUXT_VERSION=0.1.0

.PHONY: all

build:
cd docker && DOCKER_BUILDKIT=1 docker build -t taywa/nuxt:$(NUXT_VERSION) nuxt

push:
docker push taywa/nuxt:$(NUXT_VERSION)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# README

Build Image for nuxt with docker
31 changes: 31 additions & 0 deletions docker/nuxt/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# syntax=docker/dockerfile:experimental
FROM alpine:3.11.5
MAINTAINER Yves Serrano <[email protected]>

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV YARN_CACHE_FOLDER /tmp/yarn_cache

# essential layer
RUN apk add --no-cache \
curl \
nodejs \
yarn \
make
RUN mkdir -p /opt/nuxt /node_modules /tmp/yarn_cache && ln -s /node_modules /opt/nuxt/node_modules
WORKDIR /opt/nuxt/

# s6 overlay
ARG S6_OVERLAY_VERSION=v1.22.1.0
RUN curl -Ls https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-amd64.tar.gz | tar xz -C /

# nuxt/node layer 00
COPY ./package/00/package.json ./package/00/yarn.lock /opt/nuxt/
RUN --mount=type=cache,target=/tmp/yarn_cache \
yarn install --ignore-optional

# COPY s6/etc/services.d /etc/services.d
# COPY s6/etc/cont-init.d /etc/cont-init.d
ENTRYPOINT ["/init"]

EXPOSE 8080
41 changes: 41 additions & 0 deletions docker/nuxt/package/00/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "nuxt",
"version": "1.0.0",
"description": "nuxt image",
"author": "Yves Serrano",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"test": "ava",
"test:unit": "cross-env TEST=unit ava ./test/specs/**/*",
"test:e2e": "cross-env TEST=e2e ava ./test/e2e/**/*"
},
"dependencies": {
"nuxt": "^2.0.0",
"nuxt-buefy": "^0.3.2",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/dotenv": "^1.4.0"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^2.0.0",
"@nuxtjs/eslint-module": "^1.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^6.1.0",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1",
"@vue/test-utils": "^1.0.0-beta.27",
"ava": "^3.0.0",
"@ava/babel": "^1.0.0",
"babel-plugin-module-resolver": "^3.2.0",
"browser-env": "^3.2.5",
"require-extension-hooks": "^0.3.3",
"require-extension-hooks-babel": "^1.0.0",
"require-extension-hooks-vue": "^2.0.0"
}
}
Loading

0 comments on commit 92cc7c3

Please sign in to comment.