Skip to content

Commit

Permalink
fix(ci): do not bundle .env file while building the image (#635)
Browse files Browse the repository at this point in the history
fix(ci): do not copy .env file in the image

Signed-off-by: mudler <[email protected]>
  • Loading branch information
mudler authored Nov 21, 2024
1 parent 979fb4c commit bf277c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ RUN useradd -m -s /bin/bash masa && mkdir -p /home/masa/.masa && chown -R masa:m
USER masa
WORKDIR /home/masa

# Copy the .env file into the container
COPY --chown=masa:masa .env .

# Expose necessary ports
EXPOSE 4001 8080

# Set default command to start the Go application

CMD /usr/bin/masa-node --bootnodes="$BOOTNODES" --env="$ENV" --validator="$VALIDATOR" --cachePath="$CACHE_PATH"
CMD /usr/bin/masa-node --bootnodes="$BOOTNODES" --env="$ENV" --cachePath="$CACHE_PATH" --validator

Check warning on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / docker

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
volumes:
- .:/app
- .masa-keys:/home/masa/.masa
- ./.env:/home/masa/.env
restart: always

volumes:
Expand Down

0 comments on commit bf277c6

Please sign in to comment.