Giter VIP home page Giter VIP logo

locize-cli-docker's Introduction

locize-cli-docker

This is a convenience wrapper for locize-cli

Default workdir

/lang

Entrypoint

The entrypoint of the image is the cli so you only need to add ther parameters/arguments for the command. You can read more about enrypoints here.

Example usage

For docker image builds (this is the primary reason this image exists)

FROM maven:3-jdk-11-slim as dependencies
WORKDIR /build
COPY pom.xml .
RUN mvn dependency:go-offline

FROM neticle/locize-cli:latest as translations
WORKDIR /lang
ENV LOCIZE_PID=<YOUR_PROJECT_ID>
RUN locize download --namespace backend --format properties

FROM dependencies as target
COPY src/ /build/src/
COPY --from=translations /lang/*.properties /build/src/main/resources
RUN mvn package

FROM openjdk:11-jre-slim
CMD exec java $JAVA_OPTS -jar /app/your-jar.jar
COPY --from=target /build/target/your-jar.jar /app/your-jar.jar

Use in docker compose

version: '2.4'
services:
	locize:
    	image: neticle/locize-cli:latest
    	volumes:
      		- './src/main/resources/:/locize/'
    	user: '1000:1000'
    	environment:
	      	LOCIZE_PID: <YOUR_PROJECT_ID>
	      	LOCIZE_KEY: <YOUR_PROJECT_SECRET>
    	command: sync --skip-empty true --skip-delete true --format properties
    	#restart: always # use this if you need 'real-time' sync

In this case you can use locize as follows: docker-compose run locize --help

Use with docker run

docker run -it --rm -it --rm --env LOCIZE_PID=<YOUR_PROJECT_ID> -v `pwd`/src/main/resources/:/lang neticle/locize-cli --help

locize-cli-docker's People

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.